[libvirt] Compiler warnings

Alex Jia ajia at redhat.com
Mon Oct 17 15:51:23 UTC 2011


Eric,
# rpm -q gcc
gcc-4.4.6-3.el6.x86_64

Regards,
Alex

----- Original Message -----
From: "Eric Blake" <eblake at redhat.com>
To: "Alex Jia" <ajia at redhat.com>
Cc: libvir-list at redhat.com
Sent: Monday, October 17, 2011 11:38:50 PM
Subject: Re: [libvirt]  Compiler warnings

On 10/17/2011 09:35 AM, Alex Jia wrote:
> Hi all,
> I meet the following compiler warnings today:
> ......
>    CC     libvirt_util_la-buf.lo
> util/buf.c: In function 'virBufferEscape':
> util/buf.c:430: warning: logical '&&' with non-zero constant will always
> evaluate as true [-Wlogical-op]

Which version of gcc?

>
> Has anybody the same experience?

Not with gcc 4.5.1 (Fedora 14), but not the first time that newer gcc 
has become smarter.  I'll patch it if I can reproduce it (I'll try a 
rawhide build shortly).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list