WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94913
Stylechecker warns about comparison to zero when comparing to 0.5
https://bugs.webkit.org/show_bug.cgi?id=94913
Summary
Stylechecker warns about comparison to zero when comparing to 0.5
Dominik Röttsches (drott)
Reported
2012-08-24 01:39:42 PDT
Stylechecker comlains about the following line if (fabs(result - value) == 0.5 && (result & 1)) with "Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]" I believe that's a mistake.
Attachments
cpp.py regex fix.
(3.00 KB, patch)
2012-08-29 06:14 PDT
,
Dominik Röttsches (drott)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dominik Röttsches (drott)
Comment 1
2012-08-29 06:14:14 PDT
Created
attachment 161208
[details]
cpp.py regex fix.
WebKit Review Bot
Comment 2
2012-08-29 13:05:32 PDT
Comment on
attachment 161208
[details]
cpp.py regex fix. Clearing flags on attachment: 161208 Committed
r127036
: <
http://trac.webkit.org/changeset/127036
>
WebKit Review Bot
Comment 3
2012-08-29 13:05:37 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug