Bug 130298

Summary: PlatformTimeRanges::nearest() truncates closestDelta values from double to float
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: PlatformAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, eric.carlson, jer.noble, mjs, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1 none

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.