Thread: pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that

pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that

From
neilc@svr1.postgresql.org (Neil Conway)
Date:
Log Message:
-----------
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.

Tags:
----
REL7_3_STABLE

Modified Files:
--------------
    pgsql/src/bin/pg_dump:
        pg_backup_archiver.c (r1.62.2.5 -> r1.62.2.6)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_archiver.c.diff?r1=1.62.2.5&r2=1.62.2.6)
        pg_dump.c (r1.305.2.10 -> r1.305.2.11)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c.diff?r1=1.305.2.10&r2=1.305.2.11)