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 720818 - clang's warnings
clang's warnings
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-20 13:12 UTC by Marek Chalupa
Modified: 2014-02-02 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix implicit recasting of value (792 bytes, patch)
2013-12-20 13:13 UTC, Marek Chalupa
committed Details | Review
Remove tautological condition (906 bytes, patch)
2013-12-20 13:15 UTC, Marek Chalupa
committed Details | Review

Description Marek Chalupa 2013-12-20 13:12:13 UTC
clang gives out two interesting warnings for these cases in code:

int a = 0.5;  // is always 0
(unsigned) b > 0 // always true

Attached patches that fix these.
Comment 1 Marek Chalupa 2013-12-20 13:13:23 UTC
Created attachment 264612 [details] [review]
Fix implicit recasting of value
Comment 2 Marek Chalupa 2013-12-20 13:15:03 UTC
Created attachment 264613 [details] [review]
Remove tautological condition
Comment 3 drago01 2013-12-20 18:09:20 UTC
Review of attachment 264612 [details] [review]:

LG.
Comment 4 drago01 2013-12-20 18:09:58 UTC
Review of attachment 264613 [details] [review]:

LG.
Comment 5 drago01 2014-02-02 14:25:08 UTC
Pushed both patches.