]> git.ipfire.org Git - thirdparty/postgresql.git/commit
GCC 4.0 includes a new warning option, -Wformat-literal, that emits
authorNeil Conway <neilc@samurai.com>
Sat, 30 Apr 2005 08:42:17 +0000 (08:42 +0000)
committerNeil Conway <neilc@samurai.com>
Sat, 30 Apr 2005 08:42:17 +0000 (08:42 +0000)
commit0d8cdcfe888026b934fe43d9e3c4fc39a7091aa6
tree71b584d49a4efa2b44a2fec96efdfe33f7405edf
parent8f54b0555126988e52a2e654ef28fbf651087e38
GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()
and similar functions (if the variable is derived from untrusted
data, it could include unexpected formatting sequences). This
emits too many warnings to be enabled by default, but it does
flag a few dubious constructs in the Postgres tree. This patch
fixes up the obvious variants: functions that are passed a variable
format string but no additional arguments.

This patch fixes a bug in pg_dump (triggers with formatting sequences
in their names are not dumped correctly) and some related pg_dump
code that looks dubious; cleanups for more harmless instances have
been applied to more recent branches.
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c