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

Greg Clayton gclayton at apple.com
Tue Jul 22 14:47:17 PDT 2014


Feel free to commit any of your static cast and intptr_t changes where needed to suppress warnings.

> On 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");
> <D4632.11786.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list