Bug 1411142 Cast enums to int to silence warning about comparing enums of different types r=jld
authorTom Ritter <tom@mozilla.com>
Mon, 23 Oct 2017 23:54:21 -0500
changeset 388047 92b3336f6941f4f75ca1b92366af814596d1ac1c
parent 388046 45f8fd6fe21a2b50d85688c5d5a1acade025ad47
child 388048 841b4cc3ecce14ffe384a7bc0fa987fd5c5df3d5
push id32739
push useracraciun@mozilla.com
push dateWed, 25 Oct 2017 09:29:21 +0000
treeherdermozilla-central@252a8528c5ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1411142
milestone58.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 1411142 Cast enums to int to silence warning about comparing enums of different types r=jld MozReview-Commit-ID: LIbuzPuZ2mr
dom/plugins/ipc/hangui/MiniShmBase.h
old mode 100644
new mode 100755
--- a/dom/plugins/ipc/hangui/MiniShmBase.h
+++ b/dom/plugins/ipc/hangui/MiniShmBase.h
@@ -125,17 +125,17 @@ public:
    */
   template<typename T> nsresult
   GetWritePtr(T*& aPtr)
   {
     if (!mWriteHeader || !mGuard) {
       return NS_ERROR_NOT_INITIALIZED;
     }
     if (sizeof(T) > mPayloadMaxLen ||
-        T::identifier <= RESERVED_CODE_LAST) {
+        (int)T::identifier <= (int)RESERVED_CODE_LAST) {
       return NS_ERROR_ILLEGAL_VALUE;
     }
     if (::WaitForSingleObject(mGuard, mTimeout) != WAIT_OBJECT_0) {
       return NS_ERROR_NOT_AVAILABLE;
     }
     mWriteHeader->mId = T::identifier;
     mWriteHeader->mPayloadLen = sizeof(T);
     aPtr = reinterpret_cast<T*>(mWriteHeader + 1);
@@ -295,17 +295,17 @@ protected:
    */
   template<typename T> nsresult
   GetWritePtrInternal(T*& aPtr)
   {
     if (!mWriteHeader) {
       return NS_ERROR_NOT_INITIALIZED;
     }
     if (sizeof(T) > mPayloadMaxLen ||
-        T::identifier > RESERVED_CODE_LAST) {
+        (int)T::identifier > (int)RESERVED_CODE_LAST) {
       return NS_ERROR_ILLEGAL_VALUE;
     }
     mWriteHeader->mId = T::identifier;
     mWriteHeader->mPayloadLen = sizeof(T);
     aPtr = reinterpret_cast<T*>(mWriteHeader + 1);
     return NS_OK;
   }