Re: Non-zero constant warning on RHEL 6.1 with 0.9.7

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

 



On 11/11/2011 04:54 PM, Justin Clift wrote:
On 12/11/2011, at 8:06 AM, Eric Blake wrote:
On 11/08/2011 11:46 PM, Justin Clift wrote:
Hi guys,

Just checking 0.9.7 on RHEL 6.1 x86_64.  Noticed this when compiling
with make -j 3:

    CC     libvirt_lxc-command.o
  util/buf.c: In function 'virBufferEscape':
  util/buf.c:469: warning: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]

Obviously not fatal, but it figured someone might want to keep things warning free. :)
This is a bug in gcc, although I'm not sure if anyone has raised a bug
report against the gcc folks yet:
https://www.redhat.com/archives/libvir-list/2011-October/msg00837.html

I'm open to suggestions on how to work around it; perhaps we just need
to disable -Wlogical-op if glibc's headers are turning on the optimized
strchr (is that -D_FORTIFY_SOURCE that does it?) :(
Hmmmm, we might as well report it, so it gets looked at.

Next question is where?  Upstream gcc, or on the RG BZ as a Fedora15(+?)/RHEL6
specific gcc bug?
I am seeing it in this gcc version:
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --enable-secureplt --with-long-double-128 --with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 --build=ppc64-redhat-linux
Thread model: posix
gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)

   Stefan

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]