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
This commit is contained in:
Dan Gohman 2008-06-21 20:17:03 +00:00
parent 629c1a3f78
commit 933e51c5e3
2 changed files with 5 additions and 5 deletions

View File

@ -369,7 +369,7 @@ DefaultJITMemoryManager::DefaultJITMemoryManager() {
// Allocate a 16M block of memory for functions.
sys::MemoryBlock MemBlock = getNewMemoryBlock(16 << 20);
unsigned char *MemBase = reinterpret_cast<unsigned char*>(MemBlock.base());
unsigned char *MemBase = static_cast<unsigned char*>(MemBlock.base());
// Allocate stubs backwards from the base, allocate functions forward
// from the base.

View File

@ -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);