Bug 130298 - PlatformTimeRanges::nearest() truncates closestDelta values from double to float
Summary: PlatformTimeRanges::nearest() truncates closestDelta values from double to float
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-15 21:54 PDT by David Kilzer (:ddkilzer)
Modified: 2014-03-16 10:05 PDT (History)
6 users (show)

See Also:


Attachments
Patch v1 (3.28 KB, patch)
2014-03-15 22:05 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2014-03-15 21:54:21 PDT
WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
            closestDelta = fabsf(startTime - time);
                           ^
WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: note: use function 'fabs' instead
            closestDelta = fabsf(startTime - time);
                           ^~~~~
                           fabs
WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
            closestDelta = fabsf(endTime - time);
                           ^
WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: note: use function 'fabs' instead
            closestDelta = fabsf(endTime - time);
                           ^~~~~
                           fabs
2 errors generated.
Comment 1 David Kilzer (:ddkilzer) 2014-03-15 22:05:51 PDT
Created attachment 226831 [details]
Patch v1
Comment 2 WebKit Commit Bot 2014-03-16 10:05:44 PDT
Comment on attachment 226831 [details]
Patch v1

Clearing flags on attachment: 226831

Committed r165701: <http://trac.webkit.org/changeset/165701>
Comment 3 WebKit Commit Bot 2014-03-16 10:05:49 PDT
All reviewed patches have been landed.  Closing bug.