Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >> Heikki Linnakangas wrote: >>> I think the usual way is to call the function like: >>> (void) function_with_return_value() > >> I tried that first, of course. gcc is too smart about that - it still >> throws the warning in this case. > > I think you must have a broken version of gcc. I don't like this > patch either. The (void) is the standard way and should work; > futhermore, if you're getting a warning here, why aren't you getting > a whole lot of others? It's not like we are careful to use (void) > everywhere.
It's: gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2 Error was: pg_regress.c:282: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result It's because system() is flagged with __attribute(warn_unused_result)__. That's why we're not seeing it for other functions. There's a paragraph about the difference in the GCC docs. If that's in the new versions of gcc, I expect it to show up on other platforms as well as time passes. //Magnus -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers