Bug 1203357 - Fix MSVC warning in dom/workers/test/gtest/TestReadWrite.cpp. r=baku.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 10 Sep 2015 08:02:30 -0700
changeset 294395 27c8b0669d5148373ba04ced6e3e81410849ebdb
parent 294394 6d2e4a9336439388fb45e090eb0c9e4efdb190e5
child 294396 27221624668e0b0d5c7af329caa39e3bbb011eee
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1203357
milestone43.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 1203357 - Fix MSVC warning in dom/workers/test/gtest/TestReadWrite.cpp. r=baku. The particular warning here was complaining about an unsafe comparison between a uint32_t and a bool. Also, remove ALLOW_COMPILER_WARNINGS=True for this directory.
dom/workers/test/gtest/TestReadWrite.cpp
dom/workers/test/gtest/moz.build
--- a/dom/workers/test/gtest/TestReadWrite.cpp
+++ b/dom/workers/test/gtest/TestReadWrite.cpp
@@ -243,17 +243,17 @@ TEST(ServiceWorkerRegistrar, TestWriteDa
 
   for (int i = 0; i < 10; ++i) {
     nsAutoCString test;
 
     ASSERT_EQ(data[i].principal().type(), mozilla::ipc::PrincipalInfo::TContentPrincipalInfo);
     const mozilla::ipc::ContentPrincipalInfo& cInfo = data[i].principal();
 
     ASSERT_EQ((uint32_t)i, cInfo.appId());
-    ASSERT_EQ((uint32_t)(i %2), cInfo.isInBrowserElement());
+    ASSERT_EQ((uint32_t)(i % 2), (uint32_t)cInfo.isInBrowserElement());
 
     test.AppendPrintf("spec write %d", i);
     ASSERT_STREQ(test.get(), cInfo.spec().get());
 
     test.Truncate();
     test.AppendPrintf("scope write %d", i);
     ASSERT_STREQ(test.get(), data[i].scope().get());
 
--- a/dom/workers/test/gtest/moz.build
+++ b/dom/workers/test/gtest/moz.build
@@ -5,12 +5,9 @@
 # file, you can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES = [
     'TestReadWrite.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
-
 FINAL_LIBRARY = 'xul-gtest'