Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.
Date: 2008-11-20 15:27:09
Message-ID: 2101.1227194829@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> 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.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2008-11-20 15:29:50 Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.
Previous Message Magnus Hagander 2008-11-20 15:11:53 Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-20 15:27:59 Re: Error arguments in pl_exec.c
Previous Message Peter Eisentraut 2008-11-20 15:24:57 Re: Autoconf, libpq and replacement function