The pythread variable could be used without being initialized, fix it by
initializing it to nullptr.
gdb/ChangeLog:
* python/py-threadevent.c (py_get_event_thread): Initialize
pythread.
+2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * python/py-threadevent.c (py_get_event_thread): Initialize
+ pythread.
+
2018-08-24 Pedro Alves <palves@redhat.com>
* python/py-bpevent.c (create_breakpoint_event_object): Use
PyObject *
py_get_event_thread (ptid_t ptid)
{
- PyObject *pythread;
+ PyObject *pythread = nullptr;
if (non_stop)
{
else
pythread = Py_None;
- if (!pythread)
+ if (pythread == nullptr)
{
PyErr_SetString (PyExc_RuntimeError, "Could not find event thread");
return NULL;