Bug 677993: Add a cast to fix 'cast to pointer from integer of different size' gcc warning in jsobjinlines.h r=bhackett
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 11 Aug 2011 11:15:08 -0700
changeset 74268 129f83a789bebc39e9fedea8fe33fe9d6001400d
parent 74267 0324f71c6757d02ca6b7801b4689bebbed553d81
child 74269 5292dbb5f57598086378bb8ca92a31dc3e04b210
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersbhackett
bugs677993
milestone8.0a1
Bug 677993: Add a cast to fix 'cast to pointer from integer of different size' gcc warning in jsobjinlines.h r=bhackett
js/src/jsobjinlines.h
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -345,17 +345,17 @@ JSObject::getArrayLength() const
     JS_ASSERT(isArray());
     return (uint32)(size_t) getPrivate();
 }
 
 inline void
 JSObject::setArrayLength(uint32 length)
 {
     JS_ASSERT(isArray());
-    setPrivate((void*) length);
+    setPrivate((void*)(size_t)length);
 }
 
 inline uint32
 JSObject::getDenseArrayCapacity()
 {
     JS_ASSERT(isDenseArray());
     return numSlots();
 }