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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.
Дата
Msg-id 2101.1227194829@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Autoconf, libpq and replacement function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error arguments in pl_exec.c