After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 711540 - x11/clutter-backend-x11.c, clutter-timeline.c: 3 * bad if tests ?
x11/clutter-backend-x11.c, clutter-timeline.c: 3 * bad if tests ?
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
1.16.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-06 11:22 UTC by dcb
Modified: 2014-02-10 17:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
x11: Fix bad logic in axis check (1020 bytes, patch)
2014-02-10 17:41 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
timeline: Fix bad logic in check (1.86 KB, patch)
2014-02-10 17:41 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
build: Add -Werror=logical-op (897 bytes, patch)
2014-02-10 17:42 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description dcb 2013-11-06 11:22:38 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.
Comment 1 Emmanuele Bassi (:ebassi) 2014-02-10 17:41:40 UTC
Created attachment 268699 [details] [review]
x11: Fix bad logic in axis check
Comment 2 Emmanuele Bassi (:ebassi) 2014-02-10 17:41:49 UTC
Created attachment 268700 [details] [review]
timeline: Fix bad logic in check
Comment 3 Emmanuele Bassi (:ebassi) 2014-02-10 17:42:01 UTC
Created attachment 268701 [details] [review]
build: Add -Werror=logical-op

Caught a couple of checks that evaluated to always true.
Comment 4 Emmanuele Bassi (:ebassi) 2014-02-10 17:46:07 UTC
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.