Bug 1392642 Remove unused variables in netwerk/ to silence warnings r=bagder,nwgh
authorTom Ritter <tom@mozilla.com>
Thu, 24 Aug 2017 12:03:19 -0500
changeset 377034 79d295e791366a30a4392eae9a315211b91e557a
parent 377033 34a4eebfa1654dca3cd19e1349cff13e406f2ee6
child 377035 56ae3de7d69c13dcef92308a4695b5db7307dade
push id32397
push userphilringnalda@gmail.com
push dateSun, 27 Aug 2017 01:13:26 +0000
treeherdermozilla-central@30ee0dcda883 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbagder, nwgh
bugs1392642
milestone57.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 1392642 Remove unused variables in netwerk/ to silence warnings r=bagder,nwgh 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;
                 }