Re: warn_unused_result in pgbench - Mailing list pgsql-hackers

From Robert Haas
Subject Re: warn_unused_result in pgbench
Date
Msg-id CA+TgmoZvsEdR+_gYu_dvCpiBLyTd7ert8V_sd8gic4cgaRo6-g@mail.gmail.com
Whole thread Raw
In response to warn_unused_result in pgbench  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Wed, Jun 19, 2013 at 9:38 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> When building without thread safety, I get the following compiler
> warning in pgbench:
>
> pgbench.c:2612:2: error: ignoring return value of function declared with warn_unused_result attribute
[-Werror,-Wunused-result]
>         write(th->pipes[1], ret, sizeof(TResult));
>
> That should be fixed, I think.

We can stick a cast-to-void in there if that helps.  Or we could have
the process exit(1) or exit(42) or something in that case.  But then
pthread_join() would also need to get smarter, as would its callers.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [9.4 CF 1] The Commitfest Slacker List
Next
From: ian link
Date:
Subject: Re: Review: query result history in psql