Re: warn_unused_result in pgbench

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: warn_unused_result in pgbench
Дата
Msg-id CA+TgmoZvsEdR+_gYu_dvCpiBLyTd7ert8V_sd8gic4cgaRo6-g@mail.gmail.com
обсуждение исходный текст
Ответ на warn_unused_result in pgbench  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [9.4 CF 1] The Commitfest Slacker List
Следующее
От: ian link
Дата:
Сообщение: Re: Review: query result history in psql