Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit. - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Date
Msg-id 4D5CF5EF020000250003AB98@gw.wicourts.gov
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add support for logging the current role
Next
From: Stephen Frost
Date:
Subject: Re: Add support for logging the current role