Index: third_party/tcmalloc/chromium/src/maybe_threads.cc |
diff --git a/third_party/tcmalloc/chromium/src/maybe_threads.cc b/third_party/tcmalloc/chromium/src/maybe_threads.cc |
index 15c8a23dcb3509549ef6b45531f2418e988a3cf5..87054d00039939d08411d602a03a3491ab92e86d 100644 |
--- a/third_party/tcmalloc/chromium/src/maybe_threads.cc |
+++ b/third_party/tcmalloc/chromium/src/maybe_threads.cc |
@@ -124,7 +124,9 @@ int perftools_pthread_once(pthread_once_t *ctl, |
if (pthread_once) { |
return pthread_once(ctl, init_routine); |
} else { |
- if (memcmp(ctl, &pthread_once_init, sizeof(*ctl)) == 0) { |
+ if (memcmp((const void*)(ctl), |
+ (const void*)(&pthread_once_init), |
+ sizeof(*ctl)) == 0) { |
Dai Mikurube (NOT FULLTIME)
2013/05/08 14:53:25
Ok, then let's use C++ style cast.
bulach
2013/05/08 16:09:10
:)
it's a double-cast, and not entirely sure it'd
Dai Mikurube (NOT FULLTIME)
2013/05/09 16:29:28
wow, it's long, but I believe it's the better way.
|
init_routine(); |
++*(char*)(ctl); // make it so it's no longer equal to init |
} |