Bug 1257305 - Avoid VS2015 about casting int to void*. r=dvander
authorJed Davis <jld@mozilla.com>
Wed, 16 Mar 2016 17:47:00 -0400
changeset 289309 4cde1aabe95e6c8d98a88055797737481e04352f
parent 289308 516d8328dcb6718d4f0a23d772354ebe2267956a
child 289310 9cd676104bc42cf7e3153ec144d70c3171f08454
push id30099
push usercbook@mozilla.com
push dateFri, 18 Mar 2016 14:52:23 +0000
treeherdermozilla-central@9c5d494d0548 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1257305
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1257305 - Avoid VS2015 about casting int to void*. r=dvander
ipc/chromium/src/base/thread_local.h
--- a/ipc/chromium/src/base/thread_local.h
+++ b/ipc/chromium/src/base/thread_local.h
@@ -102,17 +102,18 @@ class ThreadLocalBoolean {
   ThreadLocalBoolean() { }
   ~ThreadLocalBoolean() { }
 
   bool Get() {
     return tlp_.Get() != NULL;
   }
 
   void Set(bool val) {
-    tlp_.Set(reinterpret_cast<void*>(val ? 1 : 0));
+    uintptr_t intVal = val ? 1 : 0;
+    tlp_.Set(reinterpret_cast<void*>(intVal));
   }
 
  private:
   ThreadLocalPointer<void> tlp_;
 
   DISALLOW_COPY_AND_ASSIGN(ThreadLocalBoolean);
 };