mirror of https://github.com/python/cpython
gh-101609: Fix "‘state’ may be used uninitialized" warning in `_xxinterpchannelsmodule` (GH-101610)
I went with the easiest solution: just removing the offending line. See the issue description with my reasoning. https://github.com/python/cpython/issues/101609
This commit is contained in:
parent
b96b344f25
commit
262003fd32
|
@ -174,7 +174,9 @@ static int
|
|||
clear_module_state(module_state *state)
|
||||
{
|
||||
/* heap types */
|
||||
(void)_PyCrossInterpreterData_UnregisterClass(state->ChannelIDType);
|
||||
if (state->ChannelIDType != NULL) {
|
||||
(void)_PyCrossInterpreterData_UnregisterClass(state->ChannelIDType);
|
||||
}
|
||||
Py_CLEAR(state->ChannelIDType);
|
||||
|
||||
/* exceptions */
|
||||
|
@ -2269,7 +2271,6 @@ module_exec(PyObject *mod)
|
|||
return 0;
|
||||
|
||||
error:
|
||||
(void)_PyCrossInterpreterData_UnregisterClass(state->ChannelIDType);
|
||||
_globals_fini();
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue