Re: [9.0beta5/cvs head] build failure due to unchecked results - Mailing list pgsql-bugs

From Martin Pitt
Subject Re: [9.0beta5/cvs head] build failure due to unchecked results
Date
Msg-id 20100501084510.GL2696@piware.de
Whole thread Raw
In response to Re: [9.0beta5/cvs head] build failure due to unchecked results  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane [2010-04-30 12:51 -0400]:
> I concur, those two changes look worthwhile.  The proposed Assert()
> additions are right out, though, as they would turn write failures
> into database crashes.

Right, that might be too strong.

> The current code doesn't even think that such a failure is worth
> testing for, so that's surely an overreaction.  (And in any case, if
> Asserts are disabled, this change would fail to suppress the
> warning, no?)

It seems gcc is happy enough if you assign the returned value to a
variable. At least I have done a build without --enable-cassert (where
the entire Assert() was thrown away), and it didn't complain about the
unchecked result any more. I guess that heuristics gets it only so
far..

Thanks,

Martin

--
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL 8.4 - dumping database connection privileges
Next
From: Tom Lane
Date:
Subject: Re: plpython memory leak uppon empty resultsets in all versions