qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] hw/xics: Fix one-bit signed bitfields


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] hw/xics: Fix one-bit signed bitfields
Date: Sat, 22 Sep 2012 23:34:47 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120724 Iceowl/1.0b1 Icedove/3.0.11

Am 04.09.2012 22:53, schrieb Peter Maydell:
On 4 September 2012 21:30, Stefan Weil<address@hidden>  wrote:
Report from smatch:

xics.c:169:19: error: dubious one-bit signed bitfield
xics.c:170:15: error: dubious one-bit signed bitfield
xics.c:171:19: error: dubious one-bit signed bitfield
xics.c:172:25: error: dubious one-bit signed bitfield

Instead of replacing 'int' by 'unsigned', 'bool' was used because
all 4 values are boolean values.

Replacing 0 and 1 in the assignments by false and true
looks better for those boolean values.

If we're changing this we should just drop the bitfield usage
entirely and use plain bool, I think.

-- PMM

David, could you please review the patch and Peter's suggestion?
See also http://patchwork.ozlabs.org/patch/181671/

Thanks,

Stefan Weil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]