https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126344
--- Comment #1 from Aaron Puchert <aaron.puchert at sap dot com> --- However, adding "if (pos < 0) return;" (before snprintf or after "pos += result") makes the warning go away. So regarding the last point it looks like constraint propagation can't prove that pos will remain non-negative (perhaps because of overflow). So I think this part is fine.
