]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 10 Jul 2026 11:36:20 +0000 (13:36 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 11:36:20 +0000 (11:36 +0000)
gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445)
(cherry picked from commit 33678dc79f00059aff09ac88f188ef2192031a85)

Co-authored-by: sobolevn <mail@sobolevn.me>
Modules/_interpchannelsmodule.c

index afaa4256277181ed4d1cc7ce1e2bc02840cebf9a..c38495058692768f80196e7ecbe5e0c1c5da9a95 100644 (file)
@@ -2935,7 +2935,8 @@ channelsmod_create(PyObject *self, PyObject *args, PyObject *kwds)
 
     int64_t cid = channel_create(&_globals.channels, defaults);
     if (cid < 0) {
-        (void)handle_channel_error(cid, self, cid);
+        // Negative `cid` can't be too big for a downcast:
+        (void)handle_channel_error((int)cid, self, cid);
         return NULL;
     }
     module_state *state = get_module_state(self);