[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] xen/build: Use C99 booleans
At 16:58 +0100 on 14 Jul (1468515536), Andrew Cooper wrote: > and switch bool_t to being of type _Bool rather than char. > > Using bool_t as char causes several subtle problems; first that a bool_t > actually has more than two values, and that (bool_t)0x100 actually has the > value 0 rather than the expected 1, due to truncation. > > Making this change reveals two bugs now caught by the compiler. > errata_c6_eoi_workaround() actually makes use of bool_t having more than two > states, while generic_apic_probe() has a integer in the middle of a compound > bool_t assignment (which triggers a [-Werror=parentheses] warning on Debian > Jessie). > > Finally, it turns out that ARM is mixing and matching bool_t and bool, despite > their different semantics. This change brings the semantics of bool_t to > match bool, but does not alter the current mix. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Thank you for doing this! Acked-by: Tim Deegan <tim@xxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |