diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-12-05 21:41:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 21:41:06 (GMT) |
commit | e9e63ad8653296c199446d6f7cdad889e492a34e (patch) | |
tree | b9c63c84d5ddf87f335ec5e45eff0a698bec1510 /Modules | |
parent | f49c735e525cf031ddbfc19161aafac4fb18837b (diff) | |
download | cpython-e9e63ad8653296c199446d6f7cdad889e492a34e.zip cpython-e9e63ad8653296c199446d6f7cdad889e492a34e.tar.gz cpython-e9e63ad8653296c199446d6f7cdad889e492a34e.tar.bz2 |
gh-99984: Fix Compiler Warnings (#100036)
https://github.com/python/cpython/issues/99984
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_xxsubinterpretersmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c index d7d7fca..0892fa3 100644 --- a/Modules/_xxsubinterpretersmodule.c +++ b/Modules/_xxsubinterpretersmodule.c @@ -2583,7 +2583,7 @@ channel_create(PyObject *self, PyObject *Py_UNUSED(ignored)) { int64_t cid = _channel_create(&_globals.channels); if (cid < 0) { - (void)handle_channel_error(cid, self, -1); + (void)handle_channel_error(-1, self, cid); return NULL; } module_state *state = get_module_state(self); @@ -2985,6 +2985,11 @@ module_exec(PyObject *mod) return -1; } + module_state *state = get_module_state(mod); + if (state == NULL) { + goto error; + } + /* Add exception types */ if (interp_exceptions_init(mod) != 0) { goto error; @@ -2994,7 +2999,6 @@ module_exec(PyObject *mod) } /* Add other types */ - module_state *state = get_module_state(mod); // ChannelID state->ChannelIDType = add_new_type( |