Re: [PATCH] maint: turn on gcc logical-op checking

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

 



On Sat, Jul 24, 2010 at 10:36:50PM +0200, Matthias Bolte wrote:
> 2010/7/23 Eric Blake <eblake@xxxxxxxxxx>:
[...]
> From: Eric Blake <eblake@xxxxxxxxxx>
> Date: Fri, 23 Jul 2010 14:28:31 -0600
> Subject: [PATCH] maint: turn on gcc logical-op checking
> 
> This would have detected the bug in commit 38ad33931 (Aug 09), which
> we missed until commit f828ca35 (Jul 10); over 11 months later.
> 
> However, on Fedora 13, it also triggers LOTS of warnings from
> the libcurl-devel header for two files:
> 
> esx/esx_vi.c: In function 'esxVI_CURL_Perform':
> esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> ...
> xenapi/xenapi_driver.c: In function 'call_func':
> xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
> ...

  ACK to Matthias' patch, is there is a predefined way to avoid those
  defines, let's use it !

Daniel


-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]