[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Build fails on RHEL-5



On 04/05/2010 04:33 PM, Chris Lalancette wrote:
> #ifndef ETHERTYPE_IPV6
> #define ETHERTYPE_IPV6 0x86dd
> #endif

I did test this quickly, and while this helps, I then run into this
error:

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../src/util -I../include -I/usr/include/libxml2 -DLIBDIR=\"/usr/local/lib\" -DBINDIR=\"/usr/local/libexec\" -DSBINDIR=\"/usr/local/sbin\" -DSYSCONF_DIR=\"/usr/local/etc\" -DLOCALEBASEDIR=\"/usr/local/share/locale\" -DPKGDATADIR=\"/usr/local/share/libvirt\" -DLOCAL_STATE_DIR=\"/usr/local/var\" -DGETTEXT_PACKAGE=\"libvirt\" -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -Werror -DIN_LIBVIRT -g -O2 -MT libvirt_conf_la-nwfilter_conf.lo -MD -MP -MF .deps/libvirt_conf_la-nwfilter_conf.Tpo -c conf/nwfilter_conf.c  -fPIC -DPIC -o .libs/libvirt_conf_la-nwfilter_conf.o
cc1: warnings being treated as errors
conf/nwfilter_conf.c: In function 'virNWFilterDefParseNode':
conf/nwfilter_conf.c:1130: warning: 'data_ptr' may be used uninitialized in this function
conf/nwfilter_conf.c:1556: warning: 'found_i' may be used uninitialized in this function
make[3]: *** [libvirt_conf_la-nwfilter_conf.lo] Error 1

It seems like the gcc in RHEL-5 might not be able to figure out that data_ptr
can never be used uninitialized because it is protected by found.  The situation
with found_i is similar.  Should we set these to default values to shut the compiler up?

-- 
Chris Lalancette


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]