Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Simon Riggs" <simon(at)2ndQuadrant(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Date: 2011-02-17 16:18:23
Message-ID: 4D5CF5EF020000250003AB98@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It might be worth trying to clean up those warn_unused_result
> things, if other people are seeing those.

In `make world` I'm seeing:

scan.c: In function *yy_try_NUL_trans*:
scan.c:16256: warning: unused variable *yyg*
--
elog.c: In function *write_console*:
elog.c:1708: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
elog.c: In function *write_pipe_chunks*:
elog.c:2401: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
elog.c:2410: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
--
common.c: In function *handle_sigint*:
common.c:247: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
common.c:250: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
common.c:251: warning: ignoring return value of *write*, declared
with attribute warn_unused_result
--
option.c: In function *parseCommandLine*:
option.c:92: warning: ignoring return value of *getcwd*, declared
with attribute warn_unused_result
option.c: In function *get_pkglibdir*:
option.c:336: warning: ignoring return value of *fgets*, declared
with attribute warn_unused_result

Example of a compile line showing a warning:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -g -I../../../../src/include
-D_GNU_SOURCE -I/usr/include/libxml2 -c -o elog.o elog.c -MMD -MP
-MF .deps/elog.Po

-Kevin

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-02-17 16:26:35 Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Previous Message Simon Riggs 2011-02-17 15:37:37 Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2011-02-17 16:18:32 Re: Add support for logging the current role
Previous Message Tom Lane 2011-02-17 16:10:35 Re: Add support for logging the current role