aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Mutex.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-21 20:17:03 +0000
committerDan Gohman <gohman@apple.com>2008-06-21 20:17:03 +0000
commit933e51c5e3b9db7b0deebcbca387c86cb3b7cb3b (patch)
tree6c3e96c81489379a7728ee0290099d3bd98f265e /lib/System/Mutex.cpp
parent629c1a3f78494d0dd769fe82bd2bd17df0555843 (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.cpp8
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);