Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/animation/ r=hiro
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 28 Aug 2019 21:31:46 +0000
changeset 554252 9dcc8e550559887b04d810e828eebc6a2ab2027d
parent 554251 776b650e4d082b57ea641417f7f8eb9860a18d15
child 554253 3b0498064cbf45527e8cef8ef030d0bc4687b21c
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1577236
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/animation/ r=hiro Depends on D43779 Differential Revision: https://phabricator.services.mozilla.com/D43780
dom/animation/AnimationEffect.cpp
--- a/dom/animation/AnimationEffect.cpp
+++ b/dom/animation/AnimationEffect.cpp
@@ -177,19 +177,19 @@ ComputedTiming AnimationEffect::GetCompu
   // Factor in iteration start offset.
   if (IsFinite(overallProgress)) {
     overallProgress += result.mIterationStart;
   }
 
   // Determine the 0-based index of the current iteration.
   // https://drafts.csswg.org/web-animations/#current-iteration
   result.mCurrentIteration =
-      (result.mIterations >= UINT64_MAX &&
+      (result.mIterations >= double(UINT64_MAX) &&
        result.mPhase == ComputedTiming::AnimationPhase::After) ||
-              overallProgress >= UINT64_MAX
+              overallProgress >= double(UINT64_MAX)
           ? UINT64_MAX  // In GetComputedTimingDictionary(),
                         // we will convert this into Infinity
           : static_cast<uint64_t>(overallProgress);
 
   // Convert the overall progress to a fraction of a single iteration--the
   // simply iteration progress.
   // https://drafts.csswg.org/web-animations/#simple-iteration-progress
   double progress = IsFinite(overallProgress)