Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/base/ r=Ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 29 Aug 2019 11:35:42 +0000
changeset 554359 80d4cec02dc950ef6228d8d0a22dbf43d18ecea8
parent 554358 12222c1aa6de971f4166e9a5dc8d92d3077f82d2
child 554360 8edbf8fe48bfd2daeff36e5a6716e5d8c6cc3f69
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)
reviewersEhsan
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/base/ r=Ehsan Depends on D43780 Differential Revision: https://phabricator.services.mozilla.com/D43781
dom/base/ContentBlockingLog.cpp
--- a/dom/base/ContentBlockingLog.cpp
+++ b/dom/base/ContentBlockingLog.cpp
@@ -74,17 +74,17 @@ static bool IsReportingPerUserEnabled() 
   non_crypto::XorShift128PlusRNG rng(init[0], init[1]);
   sIsReportingEnabled.emplace(rng.nextDouble() <= kRatioReportUser);
 
   return sIsReportingEnabled.value();
 }
 
 static bool IsReportingPerDocumentEnabled() {
   constexpr double boundary =
-      kRatioReportDocument * std::numeric_limits<uint64_t>::max();
+      kRatioReportDocument * double(std::numeric_limits<uint64_t>::max());
   Maybe<uint64_t> randomNum = RandomUint64();
   return randomNum.isSome() && randomNum.value() <= boundary;
 }
 
 static bool IsReportingEnabled() {
   if (StaticPrefs::telemetry_origin_telemetry_test_mode_enabled()) {
     return true;
   } else if (!StaticPrefs::