ScriptInterpreterPython: %p should be used with void-pointer
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Jul 2014 22:02:48 +0000 (22:02 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Jul 2014 22:02:48 +0000 (22:02 +0000)
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

llvm-svn: 213695

lldb/source/Interpreter/ScriptInterpreterPython.cpp

index 9afcbbe..ec541b1 100644 (file)
@@ -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");