[Pacemaker] Why are fatal warnings enabled by default?
Dejan Muhamedagic
dejanmm at fastmail.fm
Wed Oct 21 12:36:30 UTC 2009
Hi,
On Wed, Oct 21, 2009 at 01:36:59PM +0200, Florian Haas wrote:
> On 10/21/2009 11:34 AM, Andrew Beekhof wrote:
> > On Wed, Oct 21, 2009 at 11:04 AM, Florian Haas <florian.haas at linbit.com> wrote:
> >> On 2009-10-21 10:49, Andrew Beekhof wrote:
> >>> On Wed, Oct 21, 2009 at 9:31 AM, Florian Haas <florian.haas at linbit.com> wrote:
> >>>> Andrew, Dejan,
> >>>>
> >>>> For pacemaker and agents, configure defaults to --enable-fatal-warnings.
> >>> So that the warnings get fixed.
> >>>
> >>>> AFAIR, neither of these have ever built successfully with fatal warnings
> >>>> enabled.
> >>> Only on Debian. shrug.
> >>> Everywhere else it builds just fine.
> >> Unless "everywhere else" excludes CentOS 5, where it doesn't build
> >> either. At least for me it doesn't. Don't know about upstream RHEL.
> >
> >
> > The warnings being?
>
> In agents, a simple "./configure && make" leads to:
>
> [...]
> gmake[1]: Entering directory `/home/rpmbuild/hg/cluster-agents/heartbeat'
> if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include
> -I../linux-ha -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g
> -O2 -ggdb3 -O0 -fgnu89-inline -fstack-protector-all -Wall
> -Waggregate-return -Wbad-function-cast -Wcast-qual -Wcast-align
> -Wdeclaration-after-statement -Wendif-labels -Wfloat-equal -Wformat=2
> -Wformat-security -Wformat-nonliteral -Winline -Wmissing-prototypes
> -Wmissing-declarations -Wmissing-format-attribute -Wnested-externs
> -Wno-long-long -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes
> -Wwrite-strings -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror -MT IPv6addr.o
> -MD -MP -MF ".deps/IPv6addr.Tpo" -c -o IPv6addr.o IPv6addr.c; \
> then mv -f ".deps/IPv6addr.Tpo" ".deps/IPv6addr.Po"; else rm -f
> ".deps/IPv6addr.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> IPv6addr.c: In function ‘send_ua’:
> IPv6addr.c:453: warning: passing argument 2 of
> ‘libnet_pblock_record_ip_offset’ makes pointer from integer without a cast
This doesn't happen here with libnet-1.1.2.1-140.75.i586. Which
libnet version do you have?
> IPv6addr.c:438: warning: function call has aggregate value
That function (libnet_name2addr6) indeed returns a struct and
this is going to happen with -Waggregate-return since not all
compilers support such function calls. Don't know what to do
about this one.
Thanks,
Dejan
> gmake[1]: *** [IPv6addr.o] Error 1
> gmake[1]: Leaving directory `/home/rpmbuild/hg/cluster-agents/heartbeat'
> make: *** [all-recursive] Error 1
>
> In pacemaker, I build without openais-devel installed (don't want to
> build against OpenAIS 0.80.3 found on CentOS); Heartbeat and Glue are
> built and installed from current tip. "./configure && make" leads to:
>
> [...]
> gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include
> -I../../include -I../../include -I../../libltdl -I../../libltdl
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/libxml2 -g -O2 -I/usr/include/heartbeat -ggdb3 -O0
> -fgnu89-inline -fstack-protector-all -Wall -Waggregate-return
> -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement
> -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security
> -Wformat-nonliteral -Winline -Wmissing-prototypes -Wmissing-declarations
> -Wmissing-format-attribute -Wnested-externs -Wno-long-long
> -Wno-strict-aliasing -Wpointer-arith -Wstrict-prototypes -Wwrite-strings
> -ansi -D_GNU_SOURCE -DANSI_ONLY -Werror -fPIC -MT xml.lo -MD -MP -MF
> .deps/xml.Tpo -c xml.c -fPIC -DPIC -o .libs/xml.o
> cc1: warnings being treated as errors
> xml.c: In function 'string2xml':
> xml.c:490: warning: argument 2 of 'xmlSetGenericErrorFunc' might be a
> candidate for a format attribute
> xml.c: In function 'filename2xml':
> xml.c:626: warning: argument 2 of 'xmlSetGenericErrorFunc' might be a
> candidate for a format attribute
> gmake[2]: *** [xml.lo] Error 1
> gmake[2]: Leaving directory
> `/home/rpmbuild/hg/pacemaker-stable-1.0/lib/common'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/home/rpmbuild/hg/pacemaker-stable-1.0/lib'
> make: *** [all-recursive] Error 1
>
> As said, all of this is on CentOS 5.3.
>
> Cheers,
> Florian
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
More information about the Pacemaker
mailing list