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:
David Majnemer
2014-07-22 22:00:04 +00:00
parent 5ff0278b68
commit 702c1d0986

View File

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