Skip to content

Commit e9e63ad

Browse files
gh-99984: Fix Compiler Warnings (#100036)
#99984
1 parent f49c735 commit e9e63ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Modules/_xxsubinterpretersmodule.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -2583,7 +2583,7 @@ channel_create(PyObject *self, PyObject *Py_UNUSED(ignored))
25832583
{
25842584
int64_t cid = _channel_create(&_globals.channels);
25852585
if (cid < 0) {
2586-
(void)handle_channel_error(cid, self, -1);
2586+
(void)handle_channel_error(-1, self, cid);
25872587
return NULL;
25882588
}
25892589
module_state *state = get_module_state(self);
@@ -2985,6 +2985,11 @@ module_exec(PyObject *mod)
29852985
return -1;
29862986
}
29872987

2988+
module_state *state = get_module_state(mod);
2989+
if (state == NULL) {
2990+
goto error;
2991+
}
2992+
29882993
/* Add exception types */
29892994
if (interp_exceptions_init(mod) != 0) {
29902995
goto error;
@@ -2994,7 +2999,6 @@ module_exec(PyObject *mod)
29942999
}
29953000

29963001
/* Add other types */
2997-
module_state *state = get_module_state(mod);
29983002

29993003
// ChannelID
30003004
state->ChannelIDType = add_new_type(

0 commit comments

Comments
 (0)