On Thu, Jan 08, 2015 at 06:43:20PM +0100, Jérôme Duval wrote: > 2015-01-08 8:22 GMT+01:00 Adrien Destugues <pulkomandy@xxxxxxxxx>: > > The implicit cast from int32 to bool yields the correct result > > (B_CONTROL_OFF == 0 casts to false, B_CONTROL_ON == 1 casts to true) and > > this doesn't trigger any compiler warning. > > This is nonetheless forbidden in the coding guidelines: "Always use > boolean conditions, instead of pointer/integer logic". That this > doesn't trigger any compiler warning is off my point. I read that as applying only to conditions (if/while/for), not any boolean value. If I'm wrong, the coding guidelines need to make this clearer. -- Adrien.