Bug 1392618 Fix comparison between signed and unsigned integer expressions r?dmajor draft
authorTom Ritter <tom@mozilla.com>
Tue, 22 Aug 2017 08:57:35 -0500
changeset 655108 e4760c170e7541ef6624675080fa9e85201a275b
parent 655107 24e9200ad4a6a38761d92e2fafbea2ca51596bd0
child 655109 6738bfb9c167aa877603897aecbc91c9f556296f
push id76778
push userbmo:tom@mozilla.com
push dateTue, 29 Aug 2017 17:35:26 +0000
reviewersdmajor
bugs1392618
milestone57.0a1
Bug 1392618 Fix comparison between signed and unsigned integer expressions r?dmajor MozReview-Commit-ID: JCfPClnoe2H
xpcom/build/nsWindowsDllInterceptor.h
old mode 100644
new mode 100755
--- a/xpcom/build/nsWindowsDllInterceptor.h
+++ b/xpcom/build/nsWindowsDllInterceptor.h
@@ -117,30 +117,30 @@ class WindowsDllNopSpacePatcher
 {
   typedef uint8_t* byteptr_t;
   HMODULE mModule;
 
   // Dumb array for remembering the addresses of functions we've patched.
   // (This should be nsTArray, but non-XPCOM code uses this class.)
   static const size_t maxPatchedFns = 16;
   byteptr_t mPatchedFns[maxPatchedFns];
-  int mPatchedFnsLen;
+  size_t mPatchedFnsLen;
 
 public:
   WindowsDllNopSpacePatcher()
     : mModule(0)
     , mPatchedFnsLen(0)
   {}
 
 #if defined(_M_IX86)
   ~WindowsDllNopSpacePatcher()
   {
     // Restore the mov edi, edi to the beginning of each function we patched.
 
-    for (int i = 0; i < mPatchedFnsLen; i++) {
+    for (size_t i = 0; i < mPatchedFnsLen; i++) {
       byteptr_t fn = mPatchedFns[i];
 
       // Ensure we can write to the code.
       AutoVirtualProtect protect(fn, 2, PAGE_EXECUTE_READWRITE);
       if (!protect.Protect()) {
         continue;
       }