GNOME Bugzilla – Bug 711540
x11/clutter-backend-x11.c, clutter-timeline.c: 3 * bad if tests ?
Last modified: 2014-02-10 17:46:35 UTC
I just compiled clutter-1.16.0 with extra gcc compiler flag -Wlogical-op It said ./x11/clutter-backend-x11.c:1348:7: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] ./clutter-timeline.c:2451:7: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] ./clutter-timeline.c:2525:7: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] Suggest swap || for &&. I also checked current git master sources and these three bugs are also present there.
Created attachment 268699 [details] [review] x11: Fix bad logic in axis check
Created attachment 268700 [details] [review] timeline: Fix bad logic in check
Created attachment 268701 [details] [review] build: Add -Werror=logical-op Caught a couple of checks that evaluated to always true.
thanks for opening this issue, and sorry for taking this much to get around fixing it. Attachment 268699 [details] pushed as dd034cc - x11: Fix bad logic in axis check Attachment 268700 [details] pushed as d157602 - timeline: Fix bad logic in check Attachment 268701 [details] pushed as 2662788 - build: Add -Werror=logical-op the attachments have been pushed to the clutter-1.18 branch, and will be backported to the clutter-1.16 branch when I spin a new 1.16.x release.