Author: majnemer
Date: Tue Jul 22 17:00:04 2014
New Revision: 213692

URL: http://llvm.org/viewvc/llvm-project?rev=213692&view=rev
Log:
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

Modified:
    lldb/trunk/source/API/SBHostOS.cpp

Modified: lldb/trunk/source/API/SBHostOS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBHostOS.cpp?rev=213692&r1=213691&r2=213692&view=diff
==============================================================================
--- lldb/trunk/source/API/SBHostOS.cpp (original)
+++ lldb/trunk/source/API/SBHostOS.cpp Tue Jul 22 17:00:04 2014
@@ -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));
 


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to