Bug 679832: Explicitly cast to a pointer-sized integer, when converting between 32-bit ints and void* pointers in nsCheapSets.h. r=bsmedberg
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 18 Aug 2011 16:11:55 -0700
changeset 75514 196df669baba497e9d2aabdd1dcc33f120d1bca5
parent 75513 c83fb1dd0e785e0b5f31fdeaa77a73cdda329603
child 75515 a8199bd4af834b35ee89f5380c88f0bbf0c46bb9
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersbsmedberg
bugs679832
milestone9.0a1
Bug 679832: Explicitly cast to a pointer-sized integer, when converting between 32-bit ints and void* pointers in nsCheapSets.h. r=bsmedberg
xpcom/ds/nsCheapSets.h
--- a/xpcom/ds/nsCheapSets.h
+++ b/xpcom/ds/nsCheapSets.h
@@ -170,17 +170,17 @@ private:
   /** Get the single integer */
   PRInt32 GetInt()
   {
     return PtrBits(mValOrHash) >> 1;
   }
   /** Set the single integer */
   void SetInt(PRInt32 aInt)
   {
-    mValOrHash = (void*)((aInt << 1) | 0x1);
+    mValOrHash = (void*)(intptr_t)((aInt << 1) | 0x1);
   }
   /** Create the hash and initialize */
   nsresult InitHash(nsInt32HashSet** aSet);
 
 private:
   /** A hash or int, depending on the lower bit (0=hash, 1=int) */
   void* mValOrHash;
 };