pgsql: Suppress possibly-uninitialized-variable warnings from gcc 4.5.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Suppress possibly-uninitialized-variable warnings from gcc 4.5.
Date: 2011-01-22 22:57:13
Message-ID: E1PgmOP-0007V4-Km@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Suppress possibly-uninitialized-variable warnings from gcc 4.5.

It appears that gcc 4.5 can issue such warnings for whole structs, not
just scalar variables as in the past. Refactor some pg_dump code slightly
so that the OutputContext local variables are always initialized, even
if they won't be used. It's cheap enough to not be worth worrying about.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=e2627258c3cc43b8b00c5c29c35933a33259e718

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 44 ++++++++++++++++++++++-----------
src/bin/pg_dump/pg_backup_archiver.h | 6 ----
2 files changed, 29 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-01-22 23:02:06 pgsql: Suppress "control reaches end of non-void function" warning from
Previous Message User Cunha17 2011-01-22 21:48:28 snapshot - src: FIX: for forum thead