[Webkit-unassigned] [Bug 145919] Fix absolute value warning in LocalizedStringsGtk.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 19 16:51:53 PDT 2015


--- Comment #1 from Michael Catanzaro <mcatanzaro at igalia.com> ---
There are two things wrong:

* Clang warns when passing a float to ::abs() because ::abs() will truncate the value, returning an int. If you are passing in a float, there's a high probability you wants to use std::abs() to receive a float instead.
* The current code casts the result of ::abs(), an int, to an int, which is pointless. We could remove the cast, but that would not avoid the clang warning. This is a very strange case that a compiler warning requires us to use an unnecessary cast.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150619/962321e5/attachment.html>

More information about the webkit-unassigned mailing list