[pgpool-hackers: 1120] Re: [pgpool-committers: 2733] pgpool: Fix compiler warnings

Yugo Nagata nagata at sraoss.co.jp
Tue Oct 20 11:14:41 JST 2015


On Tue, 20 Oct 2015 10:41:28 +0900 (JST)
Tatsuo Ishii <ishii at postgresql.org> wrote:

I'm fixing this though havn't commit yet.

I think it is better to fix #include rather than pg_config_manual.h, 
since palloc.h and stringinf.h use PostgreSQL's pg_config_manual.h
instead of pgpool's. Dependency to PostgreSQL's header should be
reduced.

I attached the pacth I planed to commit. Any comment?

> Done.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
> > With this commit still tons of warnings are produced when compiled
> > with PostgreSQL 9.4 (or before )installed.
> > 
> > 	gcc -DHAVE_CONFIG_H -I. -I../../src/include  -D_GNU_SOURCE -I /usr/local/pgsql/include   -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -MT wd_heartbeat.o -MD -MP -MF $depbase.Tpo -c -o wd_heartbeat.o wd_heartbeat.c &&\
> > 	mv -f $depbase.Tpo $depbase.Po
> > In file included from ../../src/include/parser/stringinfo.h:22:0,
> >                  from ../../src/include/utils/elog.h:20,
> >                  from wd_heartbeat.c:49:
> > ../../src/include/parser/pg_config_manual.h:69:0: warning: "SEQ_MAXVALUE" redefined [enabled by default]
> >  #define SEQ_MAXVALUE PG_INT64_MAX
> >  ^
> > In file included from ../../src/include/utils/palloc.h:31:0,
> >                  from wd_heartbeat.c:47:
> > /usr/local/pgsql/include/pg_config_manual.h:51:0: note: this is the location of the previous definition
> >  #define SEQ_MAXVALUE INT64CONST(0x7FFFFFFFFFFFFFFF)
> >  ^
> > 
> > Probably you should use #ifdef in
> > src/include/parser/pg_config_manual.h to avoid redefinition of
> > #define.
> > 
> > Best regards,
> > --
> > Tatsuo Ishii
> > SRA OSS, Inc. Japan
> > English: http://www.sraoss.co.jp/index_en.php
> > Japanese:http://www.sraoss.co.jp
> > 
> > From: Yugo Nagata <nagata at sraoss.co.jp>
> > Subject: [pgpool-committers: 2733] pgpool: Fix compiler warnings
> > Date: Fri, 16 Oct 2015 04:34:37 +0000
> > Message-ID: <E1Zmwiz-0006Vz-27 at gothos.postgresql.org>
> > 
> >> Fix compiler warnings
> >> 
> >> Branch
> >> ------
> >> master
> >> 
> >> Details
> >> -------
> >> http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=bb96b767624ff43a1d3ea18a2aae7147ac1cc801
> >> 
> >> Modified Files
> >> --------------
> >> src/parser/scan.c      |   28 +++++++---------------------
> >> src/parser/snprintf.c  |    3 +--
> >> src/utils/pool_path.c  |    5 ++++-
> >> src/utils/statistics.c |    1 +
> >> 4 files changed, 13 insertions(+), 24 deletions(-)
> >> 
> >> _______________________________________________
> >> pgpool-committers mailing list
> >> pgpool-committers at pgpool.net
> >> http://www.pgpool.net/mailman/listinfo/pgpool-committers
> > _______________________________________________
> > pgpool-hackers mailing list
> > pgpool-hackers at pgpool.net
> > http://www.pgpool.net/mailman/listinfo/pgpool-hackers
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers


-- 
Yugo Nagata <nagata at sraoss.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warning.patch
Type: text/x-diff
Size: 2053 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20151020/d5ac0d99/attachment.bin>


More information about the pgpool-hackers mailing list