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

Re: [Xen-devel] [PATCH] tools/xenstore: Add -Wno-bool-operation



On 05/04/17 14:13, Ian Jackson wrote:
> This suppresses a warning from GCC7
>   xenstored_domain.c:949:32: error: increment of a boolean expression
>
> We have not yet 100% concluded that this should not be fixed by
> changing the `_Bool b; b++;' to `b = 1'.  But this fixes the warning
> and thus the build for now, and we want to apply the XSA-206 patches
> to stable trees.
>
> In the stable trees, this should be applied _before_ the XSA-206
> series.
>
> Reported-by: Michael Young <m.a.young@xxxxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

I'm fairly sure this will break the Clang build.

Furthermore, the proper fix here is to make less "clever" code.  IMO,
this compiler warning is entirely legitimate, because relying on the
saturation behaviour of incrementing a boolean is worthy only for
obfuscated code.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.