Bug report
This code produces a warning:
|
PyObject *exc; |
|
if (res == NULL) { |
|
exc = PyErr_GetRaisedException(); |
|
} |
|
if (self->finalizing) { |
|
PyObject *r = fileio_dealloc_warn(self, (PyObject *) self); |
|
if (r) { |
|
Py_DECREF(r); |
|
} |
|
else { |
|
PyErr_Clear(); |
|
} |
|
} |
|
rc = internal_close(self); |
|
if (res == NULL) { |
|
_PyErr_ChainExceptions1(exc); |
|
} |
Link: https://buildbot.python.org/all/#/builders/1061/builds/695/steps/7/logs/warnings__145_
I think that it is enough to add = NULL; to PyObject *exc;.
Linked PRs
Bug report
This code produces a warning:
cpython/Modules/_io/fileio.c
Lines 160 to 176 in a34e4db
Link: https://buildbot.python.org/all/#/builders/1061/builds/695/steps/7/logs/warnings__145_
I think that it is enough to add
= NULL;toPyObject *exc;.Linked PRs
maybe-uninitializedwarning inModules/_io/fileio.c#114287maybe-uninitializedwarning inModules/_io/fileio.c(GH-114287) #114288