Bug 1392642 Remove unused variables in netwerk/ to silence warnings draft
authorTom Ritter <tom@mozilla.com>
Thu, 24 Aug 2017 12:03:19 -0500
changeset 652458 0eb47f7e207f4156cbc187f4adff0c390728360f
parent 652393 0e524064ca4c88b8420a02378b36e2d5a3ef3bcd
child 652700 f8d990a58eab8297d3aed5d7e6d57cef041947c3
push id76066
push userbmo:tom@mozilla.com
push dateThu, 24 Aug 2017 21:37:29 +0000
bugs1392642
milestone57.0a1
Bug 1392642 Remove unused variables in netwerk/ to silence warnings MozReview-Commit-ID: LLTB5RJ4ZMz
netwerk/cache2/CacheIOThread.cpp
netwerk/dns/nsHostResolver.cpp
netwerk/system/win32/nsNotifyAddrListener.cpp
old mode 100644
new mode 100755
--- a/netwerk/cache2/CacheIOThread.cpp
+++ b/netwerk/cache2/CacheIOThread.cpp
@@ -143,17 +143,17 @@ BlockingIOWatcher::~BlockingIOWatcher()
   if (mThread) {
     CloseHandle(mThread);
   }
 }
 
 void BlockingIOWatcher::InitThread()
 {
   // GetCurrentThread() only returns a pseudo handle, hence DuplicateHandle
-  BOOL result = ::DuplicateHandle(
+  ::DuplicateHandle(
     GetCurrentProcess(),
     GetCurrentThread(),
     GetCurrentProcess(),
     &mThread,
     0,
     FALSE,
     DUPLICATE_SAME_ACCESS);
 }
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -512,17 +512,17 @@ static void DnsPrefChanged(const char* a
     MOZ_ASSERT(NS_IsMainThread(),
                "Should be getting pref changed notification on main thread!");
 
     if (strcmp(aPref, kPrefGetTtl) != 0) {
         LOG(("DnsPrefChanged ignoring pref \"%s\"", aPref));
         return;
     }
 
-    auto self = static_cast<nsHostResolver*>(aClosure);
+    DebugOnly<nsHostResolver*> self = static_cast<nsHostResolver*>(aClosure);
     MOZ_ASSERT(self);
 
     sGetTtlEnabled = Preferences::GetBool(kPrefGetTtl);
 }
 #endif
 
 nsHostResolver::nsHostResolver(uint32_t maxCacheEntries,
                                uint32_t defaultCacheEntryLifetime,
old mode 100644
new mode 100755
--- a/netwerk/system/win32/nsNotifyAddrListener.cpp
+++ b/netwerk/system/win32/nsNotifyAddrListener.cpp
@@ -182,17 +182,16 @@ bool nsNotifyAddrListener::findMac(char 
         UniquePtr <char[]>buf(new char[dwActualSize]);
         PMIB_IPNETTABLE pIpNetTable =
             reinterpret_cast<PMIB_IPNETTABLE>(&buf[0]);
 
         status = GetIpNetTable(pIpNetTable, &dwActualSize, FALSE);
 
         if (status == NO_ERROR) {
             for (DWORD i = 0; i < pIpNetTable->dwNumEntries; ++i) {
-                DWORD dwCurrIndex = pIpNetTable->table[i].dwIndex;
                 char hw[256];
 
                 if (!macAddr(pIpNetTable->table[i].bPhysAddr,
                              pIpNetTable->table[i].dwPhysAddrLen,
                              hw, sizeof(hw))) {
                     // failed to get the MAC
                     continue;
                 }