| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql(at)j-davis(dot)com, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: new compiler warnings |
| Date: | 2011-10-18 13:32:15 |
| Message-ID: | 3542.1318944735@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-10-18 13:32:24 | Re: [v9.2] make_greater_string() does not return a string in some cases |
| Previous Message | Andrew Dunstan | 2011-10-18 13:26:02 | Re: new compiler warnings |