From 12bb77ddd1ab418fce280d2be5af9a3b6c4295fc Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 22 Jul 2014 22:12:58 +0000 Subject: [PATCH] SBCommunication: 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 diagnostic emitted by GCC. llvm-svn: 213696 --- lldb/source/API/SBCommunication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp index a29f735..df0b864 100644 --- a/lldb/source/API/SBCommunication.cpp +++ b/lldb/source/API/SBCommunication.cpp @@ -250,7 +250,7 @@ SBCommunication::SetReadThreadBytesReceivedCallback if (log) log->Printf ("SBCommunication(%p)::SetReadThreadBytesReceivedCallback (callback=%p, baton=%p) => %i", static_cast(m_opaque), - reinterpret_cast(callback), + reinterpret_cast(reinterpret_cast(callback)), static_cast(callback_baton), result); return result; -- 2.7.4