Bug 484115 - "Uninitialized local variable warning in nswifimonitor.cpp" [r=doug.turner sr=jst]
authorGavin Sharp <gavin.sharp@gmail.com>
Wed, 06 May 2009 10:21:44 -0700
changeset 28036 0042069e738fdd7ff7913c9a0d5858bf9895297d
parent 28035 1ecebde2aca4e85891d59ea45747b087ee8372a6
child 28037 5263736c504ca7a0929ed83dc83b4b5fa52bc76c
child 28091 b751cb96c50d45644d07c4406843e2a9fe1e58f4
push idunknown
push userunknown
push dateunknown
reviewersdoug.turner, jst
bugs484115
milestone1.9.2a1pre
Bug 484115 - "Uninitialized local variable warning in nswifimonitor.cpp" [r=doug.turner sr=jst]
netwerk/wifi/src/nsWifiMonitor.cpp
--- a/netwerk/wifi/src/nsWifiMonitor.cpp
+++ b/netwerk/wifi/src/nsWifiMonitor.cpp
@@ -152,30 +152,30 @@ NS_IMETHODIMP nsWifiMonitor::StopWatchin
 NS_IMETHODIMP nsWifiMonitor::Run()
 {
   LOG(("@@@@@ wifi monitor run called\n"));
 
   nsresult rv = DoScan();
 
   if (mKeepGoing && NS_FAILED(rv)) {
 
+    nsCOMPtr<nsIProxyObjectManager> proxyObjMgr = do_GetService("@mozilla.org/xpcomproxy;1");
+
     // send error
     for (PRUint32 i = 0; i < mListeners.Length(); i++) {
-      
       LOG(("About to send error to a listener\n"));
-      
+
       nsCOMPtr<nsIWifiListener> proxy;
-      nsCOMPtr<nsIProxyObjectManager> proxyObjMgr = do_GetService("@mozilla.org/xpcomproxy;1");
       proxyObjMgr->GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
                                      NS_GET_IID(nsIWifiListener),
                                      mListeners[i].mListener,
                                      NS_PROXY_SYNC | NS_PROXY_ALWAYS,
                                      getter_AddRefs(proxy));
-      
+
       if (proxy) {
-        nsresult rv = proxy->OnError(rv);
+        proxy->OnError(rv);
         LOG( ("... sent %d\n", rv));
       }
     }
   }
 
   return NS_OK;
 }