mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
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:
parent
629c1a3f78
commit
933e51c5e3
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user