Bug 803707 - Don't assume pointers are 64 bits. r=Waldo.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Tue, 30 Oct 2012 17:38:13 -0400
changeset 111958 e7d9b7fadd242e92f3c0a31a9ece2c83c61fee29
parent 111957 b511cc69f71774e42589f1fd843006d230e3cd13
child 111959 db5b058b11d1066a86c12c358830bd7a4d95c939
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersWaldo
bugs803707
milestone19.0a1
Bug 803707 - Don't assume pointers are 64 bits. r=Waldo. Use reinterpret_cast.
js/src/jsclone.cpp
--- a/js/src/jsclone.cpp
+++ b/js/src/jsclone.cpp
@@ -330,17 +330,17 @@ SCInput::readChars(jschar *p, size_t nch
 
 bool
 SCInput::readPtr(void **p)
 {
     // On a 32 bit system the void* variable we have to write to is only
     // 32 bits, so we create a 64 temporary and discard the unused bits.
     uint64_t tmp;
     bool ret = read(&tmp);
-    *p = (void *) tmp;
+    *p = reinterpret_cast<void*>(tmp);
     return ret;
 }
 
 SCOutput::SCOutput(JSContext *cx) : cx(cx), buf(cx) {}
 
 bool
 SCOutput::write(uint64_t u)
 {