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

From: neilc(at)svr1(dot)postgresql(dot)org (Neil Conway)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that
Date: 2005-04-30 08:42:18
Message-ID: 20050430084218.1FB405408A@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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)

Browse pgsql-committers by date

  From Date Subject
Next Message Neil Conway 2005-04-30 09:08:15 pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that
Previous Message Neil Conway 2005-04-30 08:36:18 pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that