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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.
Date: 2008-11-25 12:26:41
Message-ID: 492BEF01.20103@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Magnus Hagander wrote:
> Heikki Linnakangas wrote:
>> Magnus Hagander wrote:
>>> Log Message:
>>> -----------
>>> Silence compiler warning about ignored return value. Our comment already
>>> clearly stated that we are aware that we're ignoring it.
>> 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 have equipped this part with a proper error message now. At the time
I was thinking this is a "can't happen" error, but it has in fact
already helped clarifying some other regression test run failures for me:

./pg_regress --inputdir=. --dlpath=. --multibyte=SQL_ASCII
--load-language=plpgsql --temp-install=./tmp_check
--top-builddir=../../.. --temp-port=565432 --schedule=./parallel_schedule
============== removing existing temp installation ==============
============== creating temporary installation ==============
============== initializing database system ==============
============== starting postmaster ==============
running on port 65432 with pid 44940
============== creating database "regression" ==============
ERROR: database "regression" already exists
command failed:
"/Users/peter/devel/postgresql/cvs/pg84/pgsql/src/test/regress/./tmp_check/install//Users/peter/devel/postgresql/cvs/pg84/pg-install/bin/psql"
-X -c "CREATE DATABASE \"regression\" TEMPLATE=template0
ENCODING='SQL_ASCII'" "postgres"
pg_ctl: server does not shut down

pg_regress: could not stop postmaster: exit code was 256 <<< NEW
make: *** [check] Error 2

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-11-25 18:19:31 pgsql: Omit src/port/pipe.c on non-Windows platforms.
Previous Message Peter Eisentraut 2008-11-25 11:49:35 pgsql: If pg_ctl stop fails, print an error message and exit (instead of

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Saito 2008-11-25 13:03:52 Re: [PATCHES] Solve a problem of LC_TIME of windows.
Previous Message Peter Eisentraut 2008-11-25 12:16:32 Exporting PGINTERVALSTYLE prevents access to older server versions