[Lldb-commits] [lldb] r213695 - ScriptInterpreterPython: %p should be used with void-pointer

David Majnemer david.majnemer at gmail.com
Tue Jul 22 15:02:48 PDT 2014


Author: majnemer
Date: Tue Jul 22 17:02:48 2014
New Revision: 213695

URL: http://llvm.org/viewvc/llvm-project?rev=213695&view=rev
Log:
ScriptInterpreterPython: %p should be used with void-pointer

printf's %p format specifier expects an argument of type void-pointer,
not type PyThreadState*.  Fix this with a static_cast.

Differential Revision: http://reviews.llvm.org/D4632

Modified:
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=213695&r1=213694&r2=213695&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Tue Jul 22 17:02:48 2014
@@ -804,7 +804,7 @@ public:
             int num_threads = PyThreadState_SetAsyncExc(tid, PyExc_KeyboardInterrupt);
             if (log)
                 log->Printf("ScriptInterpreterPython::NonInteractiveInputReaderCallback, eInputReaderInterrupt, tid = %ld, num_threads = %d, state = %p",
-                            tid,num_threads,state);
+                            tid, num_threads, static_cast<void *>(state));
         }
         else if (log)
             log->Printf("ScriptInterpreterPython::NonInteractiveInputReaderCallback, eInputReaderInterrupt, state = NULL");





More information about the lldb-commits mailing list