Re: GCC 4.4 compiler warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GCC 4.4 compiler warnings
Date
Msg-id 4669.1240589740@sss.pgh.pa.us
Whole thread Raw
In response to GCC 4.4 compiler warnings  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: GCC 4.4 compiler warnings  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Re: GCC 4.4 compiler warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> GCC 4.4 produces a bunch of new compiler warnings against 8.4; see attached 
> output.  Some of these are related to our old friend fastgetattr(), but it's a 
> bit too late for me to make sense of it now.

> As we have grown accustomed to warnings-free builds, it would be nice to fix 
> these.

I've fixed all the 'variable may be used uninitialized' warnings that
I see in a basic build (there might be some others in optional code).

The 'value computed is not used' warnings all seem to come from these
lines in fastgetattr():
   (((isnull) != NULL) ? (*(isnull) = false) : (dummyret)NULL),    \
...           (((isnull) != NULL) ? (*(isnull) = true) : (dummyret)NULL),    \

Since there isn't any obvious better way to do this, I consider this
warning to be a gcc bug, and have filed it accordingly:
https://bugzilla.redhat.com/show_bug.cgi?id=497545
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext to the correct encoding on Windows.
Next
From: tomas@tuxteam.de
Date:
Subject: Re: RFE: Transparent encryption on all fields