Bug 618716 - Fix warnings in nsPermissionManager.cpp r=dwitte a=jst
authorJosh Matthews <josh@joshmatthews.net>
Sun, 12 Dec 2010 14:36:00 -0500
changeset 61850 bc9d7938cdc714d841a23a007adc6eb7b3b0c42d
parent 61849 30d1de20ece27bf8b53d7745960e13b4b4bc0f8c
child 61851 bc23b0490406ea8019ba9f7e5e193c60354642dc
push idunknown
push userunknown
push dateunknown
reviewersdwitte, jst
bugs618716
milestone2.0b12pre
Bug 618716 - Fix warnings in nsPermissionManager.cpp r=dwitte a=jst
extensions/cookie/nsPermissionManager.cpp
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -35,16 +35,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifdef MOZ_IPC
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ContentChild.h"
+#include "mozilla/unused.h"
 #endif
 #include "nsPermissionManager.h"
 #include "nsPermission.h"
 #include "nsCRT.h"
 #include "nsNetUtil.h"
 #include "nsCOMArray.h"
 #include "nsArrayEnumerator.h"
 #include "nsTArray.h"
@@ -60,16 +61,17 @@
 #include "mozStorageCID.h"
 #include "nsXULAppAPI.h"
 
 static nsPermissionManager *gPermissionManager = nsnull;
 
 #ifdef MOZ_IPC
 using mozilla::dom::ContentParent;
 using mozilla::dom::ContentChild;
+using mozilla::unused; // ha!
 
 static PRBool
 IsChildProcess()
 {
   return XRE_GetProcessType() == GeckoProcessType_Content;
 }
 
 /**
@@ -226,17 +228,17 @@ nsPermissionManager::Init()
   }
 
 #ifdef MOZ_IPC
   if (IsChildProcess()) {
     // Get the permissions from the parent process
     InfallibleTArray<IPC::Permission> perms;
     ChildProcess()->SendReadPermissions(&perms);
 
-    for (int i = 0; i < perms.Length(); i++) {
+    for (PRUint32 i = 0; i < perms.Length(); i++) {
       const IPC::Permission &perm = perms[i];
       AddInternal(perm.host, perm.type, perm.capability, 0, perm.expireType,
                   perm.expireTime, eNotify, eNoDBOperation);
     }
 
     // Stop here; we don't need the DB in the child process
     return NS_OK;
   }
@@ -476,17 +478,17 @@ nsPermissionManager::AddInternal(const n
 {
 #ifdef MOZ_IPC
   if (!IsChildProcess()) {
     // In the parent, send the update now, if the child is ready
     if (mUpdateChildProcess) {
       IPC::Permission permission((aHost),
                                  (aType),
                                  aPermission, aExpireType, aExpireTime);
-      ParentProcess()->SendAddPermission(permission);
+      unused << ParentProcess()->SendAddPermission(permission);
     }
   }
 #endif
 
   if (!gHostArena) {
     gHostArena = new PLArenaPool;
     if (!gHostArena)
       return NS_ERROR_OUT_OF_MEMORY;