[Lldb-commits] [PATCH] ScriptInterpreterPython: %p should be used with void-pointer
Zachary Turner
zturner at google.com
Tue Jul 22 14:39:51 PDT 2014
I assume this is just to supress the warning from GCC. LGTM
On Tue, Jul 22, 2014 at 2:14 PM, David Majnemer <david.majnemer at gmail.com>
wrote:
> Hi zturner, tfiala,
>
> printf's %p format specifier expects an argument of type void-pointer,
> not type PyThreadState*. Fix this with a static_cast.
>
> http://reviews.llvm.org/D4632
>
> Files:
> source/Interpreter/ScriptInterpreterPython.cpp
>
> Index: source/Interpreter/ScriptInterpreterPython.cpp
> ===================================================================
> --- source/Interpreter/ScriptInterpreterPython.cpp
> +++ source/Interpreter/ScriptInterpreterPython.cpp
> @@ -804,7 +804,7 @@
> 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");
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140722/eb5795df/attachment.html>
More information about the lldb-commits
mailing list