Re: new compiler warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: new compiler warnings
Date
Msg-id 3542.1318944735@sss.pgh.pa.us
Whole thread Raw
In response to Re: new compiler warnings  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: new compiler warnings  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: new compiler warnings  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> It is a pity we can't just tell the compiler to turn off the warning in 
> a particular case.

I haven't tested, but won't an explicit cast to void silence the
warning?
(void) fwrite(...);

There are places, notably the calls in elog.c, where ignoring write
failures is the right thing.  I think that what Kevin was on about
was something else entirely, namely whether we need to retry writes
to disk.  I would hope that we're not simply not bothering to check
in any cases where it matters.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: new compiler warnings
Next
From: Robert Haas
Date:
Subject: Re: [v9.2] make_greater_string() does not return a string in some cases