Re: [COMMITTERS] pgsql: Add missing format attributes

Lists: pgsql-committerspgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add missing format attributes
Date: 2011-09-10 20:17:32
Message-ID: E1R2TzY-0003x9-62@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Add missing format attributes

Add __attribute__ decorations for printf format checking to the places that
were missing them. Fix the resulting warnings. Add
-Wmissing-format-attribute to the standard set of warnings for GCC, so these
don't happen again.

The warning fixes here are relatively harmless. The one serious problem
discovered by this was already committed earlier in
cf15fb5cabfbc71e07be23cfbc813daee6c5014f.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/52ce20589a8bac4eccaea043b1fe283daaf4f9e3

Modified Files
--------------
configure | 60 ++++++++++++++++++++++++++++++
configure.in | 1 +
contrib/pg_upgrade/info.c | 2 +-
contrib/pg_upgrade/pg_upgrade.h | 16 +++++---
contrib/pg_upgrade/relfilenode.c | 4 +-
contrib/pgcrypto/px.h | 3 +-
src/bin/pg_dump/pg_backup_archiver.c | 4 +-
src/bin/pg_dump/pg_backup_tar.c | 2 +-
src/include/lib/stringinfo.h | 3 +-
src/interfaces/ecpg/ecpglib/descriptor.c | 4 +-
src/interfaces/ecpg/ecpglib/error.c | 2 +-
src/interfaces/ecpg/ecpglib/execute.c | 2 +-
src/interfaces/ecpg/ecpglib/extern.h | 2 +-
13 files changed, 87 insertions(+), 18 deletions(-)


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add missing format attributes
Date: 2011-09-11 07:11:57
Message-ID: CAHGQGwFVb8VsfA+H75+XcNMb6tGtRxEz4gW4BHzMhk2j9J92dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Sun, Sep 11, 2011 at 5:17 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Add missing format attributes
>
> Add __attribute__ decorations for printf format checking to the places that
> were missing them.  Fix the resulting warnings.  Add
> -Wmissing-format-attribute to the standard set of warnings for GCC, so these
> don't happen again.
>
> The warning fixes here are relatively harmless.  The one serious problem
> discovered by this was already committed earlier in
> cf15fb5cabfbc71e07be23cfbc813daee6c5014f.

This commit causes the following warning at the compile time.

error.c: In function 'ecpg_raise_backend':
error.c:339: warning: field precision should have type 'int', but
argument 2 has type 'long unsigned int'

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add missing format attributes
Date: 2011-09-11 12:24:36
Message-ID: 1315743877.1296.11.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On sön, 2011-09-11 at 16:11 +0900, Fujii Masao wrote:
> On Sun, Sep 11, 2011 at 5:17 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > Add missing format attributes
> >
> > Add __attribute__ decorations for printf format checking to the places that
> > were missing them. Fix the resulting warnings. Add
> > -Wmissing-format-attribute to the standard set of warnings for GCC, so these
> > don't happen again.
> >
> > The warning fixes here are relatively harmless. The one serious problem
> > discovered by this was already committed earlier in
> > cf15fb5cabfbc71e07be23cfbc813daee6c5014f.
>
> This commit causes the following warning at the compile time.
>
> error.c: In function 'ecpg_raise_backend':
> error.c:339: warning: field precision should have type 'int', but
> argument 2 has type 'long unsigned int'

Fixed, thanks.