mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
SBHostOS: Fix a pointer-to-function to void-pointer cast
reinterpret_cast may not convert a pointer-to-function to a void-pointer. Take a detour through intptr_t and *then* convert to a pointer-to-function. This fixes a warning emitted by GCC. Differential Revision: http://reviews.llvm.org/D4624 llvm-svn: 213692
This commit is contained in:
@@ -51,7 +51,7 @@ SBHostOS::ThreadCreate
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBHostOS::ThreadCreate (name=\"%s\", thread_function=%p, thread_arg=%p, error_ptr=%p)",
|
||||
name, reinterpret_cast<void*>(thread_function),
|
||||
name, reinterpret_cast<void*>(reinterpret_cast<intptr_t>(thread_function)),
|
||||
static_cast<void*>(thread_arg),
|
||||
static_cast<void*>(error_ptr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user