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 Kevin Buettner <kevinb@redhat.com>
PR gdb/23021
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;