Bug 785226 - fix -Wenum-compare warning spam in accessible/src/base/RoleAsserts.cpp; r=davidb
authorNathan Froyd <froydnj@mozilla.com>
Thu, 23 Aug 2012 17:00:58 -0400
changeset 105344 8aa9e479b24f2be5f2e507142d84ebfa0533f5af
parent 105343 c3cff93ee869647bbfedc3cf33bc3da714b939ac
child 105345 8618d9956e869630165c7e2def703010fd3bf1e2
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersdavidb
bugs785226
milestone17.0a1
Bug 785226 - fix -Wenum-compare warning spam in accessible/src/base/RoleAsserts.cpp; r=davidb
accessible/src/base/RoleAsserts.cpp
--- a/accessible/src/base/RoleAsserts.cpp
+++ b/accessible/src/base/RoleAsserts.cpp
@@ -7,11 +7,13 @@
 #include "nsIAccessibleRole.h"
 #include "Role.h"
 
 #include "mozilla/Assertions.h"
 
 using namespace mozilla::a11y;
 
 #define ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule) \
-  MOZ_STATIC_ASSERT(roles::geckoRole == nsIAccessibleRole::ROLE_ ## geckoRole, "internal and xpcom roles differ!");
+  MOZ_STATIC_ASSERT(static_cast<uint32_t>(roles::geckoRole) \
+                    == static_cast<uint32_t>(nsIAccessibleRole::ROLE_ ## geckoRole), \
+                    "internal and xpcom roles differ!");
 #include "RoleMap.h"
 #undef ROLE