Bug 1172805 - Fix enum comparison warnings in nsAppShell. r=mwu
authorBoris Chiou <boris.chiou@gmail.com>
Tue, 09 Jun 2015 00:11:00 -0400
changeset 248094 23450c433423332a256d9599356cf1596b815620
parent 248093 6c79d7650842fef4d642b586b6a71ec929b96efc
child 248095 42b66e48e0c74fb25406de85051340050a4bc2be
push id60888
push userkwierso@gmail.com
push dateThu, 11 Jun 2015 01:38:38 +0000
treeherdermozilla-inbound@39e638ed06bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs1172805
milestone41.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 1172805 - Fix enum comparison warnings in nsAppShell. r=mwu
widget/gonk/nsAppShell.cpp
--- a/widget/gonk/nsAppShell.cpp
+++ b/widget/gonk/nsAppShell.cpp
@@ -558,27 +558,27 @@ private:
     bool mKeyEventsFiltered;
     bool mPowerWakelock;
 };
 
 // GeckoInputReaderPolicy
 void
 GeckoInputReaderPolicy::setDisplayInfo()
 {
-    static_assert(nsIScreen::ROTATION_0_DEG ==
-                  DISPLAY_ORIENTATION_0,
+    static_assert(static_cast<int>(nsIScreen::ROTATION_0_DEG) ==
+                  static_cast<int>(DISPLAY_ORIENTATION_0),
                   "Orientation enums not matched!");
-    static_assert(nsIScreen::ROTATION_90_DEG ==
-                  DISPLAY_ORIENTATION_90,
+    static_assert(static_cast<int>(nsIScreen::ROTATION_90_DEG) ==
+                  static_cast<int>(DISPLAY_ORIENTATION_90),
                   "Orientation enums not matched!");
-    static_assert(nsIScreen::ROTATION_180_DEG ==
-                  DISPLAY_ORIENTATION_180,
+    static_assert(static_cast<int>(nsIScreen::ROTATION_180_DEG) ==
+                  static_cast<int>(DISPLAY_ORIENTATION_180),
                   "Orientation enums not matched!");
-    static_assert(nsIScreen::ROTATION_270_DEG ==
-                  DISPLAY_ORIENTATION_270,
+    static_assert(static_cast<int>(nsIScreen::ROTATION_270_DEG) ==
+                  static_cast<int>(DISPLAY_ORIENTATION_270),
                   "Orientation enums not matched!");
 
     nsRefPtr<nsScreenGonk> screen = nsScreenManagerGonk::GetPrimaryScreen();
 
     uint32_t rotation = nsIScreen::ROTATION_0_DEG;
     DebugOnly<nsresult> rv = screen->GetRotation(&rotation);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
     nsIntRect screenBounds = screen->GetNaturalBounds();