RESOLVED DUPLICATE of bug 9475696093
SVGSMILElement.cpp: fix float-to-bool conversion compiler warning
https://bugs.webkit.org/show_bug.cgi?id=96093
Summary SVGSMILElement.cpp: fix float-to-bool conversion compiler warning
Hans Wennborg
Reported 2012-09-07 03:56:31 PDT
SVGSMILElement.cpp: fix float-to-bool conversion compiler warning
Attachments
Patch (2.11 KB, patch)
2012-09-07 03:57 PDT, Hans Wennborg
no flags
Hans Wennborg
Comment 1 2012-09-07 03:57:37 PDT
WebKit Review Bot
Comment 2 2012-09-07 04:02:48 PDT
Attachment 162733 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/svg/animation/SVGSMILElement.cpp:970: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Hans Wennborg
Comment 3 2012-09-07 04:03:37 PDT
thakis: ToT Clang warns about this. But the fix goes against WebKit style guides :/ It's the second argument that triggers the warning: !simpleDuration.value(). Clang warns about the last argument in a function call is implicitly converted from bool to float, and the function returns a float which gets implicitly converted to bool.
Hans Wennborg
Comment 4 2012-09-07 07:06:52 PDT
*** This bug has been marked as a duplicate of bug 94756 ***
Eric Seidel (no email)
Comment 5 2012-10-08 16:14:25 PDT
Comment on attachment 162733 [details] Patch Cleared review? from attachment 162733 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.