diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-21 20:17:03 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-21 20:17:03 +0000 |
commit | 933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b (patch) | |
tree | 6c3e96c81489379a7728ee0290099d3bd98f265e /lib/System/Mutex.cpp | |
parent | 629c1a3f78494d0dd769fe82bd2bd17df0555843 (diff) |
Use static_cast instead of reinterpret_cast for casting void*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Mutex.cpp')
-rw-r--r-- | lib/System/Mutex.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp index 3bef7ce0b0..81dcd3b418 100644 --- a/lib/System/Mutex.cpp +++ b/lib/System/Mutex.cpp @@ -98,7 +98,7 @@ Mutex::~Mutex() { if (pthread_enabled) { - pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_); + pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); assert(mutex != 0); pthread_mutex_destroy(mutex); assert(mutex != 0); @@ -110,7 +110,7 @@ Mutex::acquire() { if (pthread_enabled) { - pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_); + pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); assert(mutex != 0); int errorcode = pthread_mutex_lock(mutex); @@ -124,7 +124,7 @@ Mutex::release() { if (pthread_enabled) { - pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_); + pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); assert(mutex != 0); int errorcode = pthread_mutex_unlock(mutex); @@ -138,7 +138,7 @@ Mutex::tryacquire() { if (pthread_enabled) { - pthread_mutex_t* mutex = reinterpret_cast<pthread_mutex_t*>(data_); + pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); assert(mutex != 0); int errorcode = pthread_mutex_trylock(mutex); |