From ccae469acabd6018c8871adb7a1ece2404a0cf79 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 22 May 2025 10:55:20 -0600 Subject: [PATCH] Fix recently introduced warnings. --- Modules/_interpchannelsmodule.c | 2 +- Modules/_interpqueuesmodule.c | 2 +- Python/crossinterp.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c index 0ab553190001bd..bfd805bf5e4072 100644 --- a/Modules/_interpchannelsmodule.c +++ b/Modules/_interpchannelsmodule.c @@ -3443,7 +3443,7 @@ channelsmod_get_channel_defaults(PyObject *self, PyObject *args, PyObject *kwds) } int64_t cid = cid_data.cid; - struct _channeldefaults defaults; + struct _channeldefaults defaults = {0}; int err = channel_get_defaults(&_globals.channels, cid, &defaults); if (handle_channel_error(err, self, cid)) { return NULL; diff --git a/Modules/_interpqueuesmodule.c b/Modules/_interpqueuesmodule.c index 816285c9eff44a..ffc52c8ee74d85 100644 --- a/Modules/_interpqueuesmodule.c +++ b/Modules/_interpqueuesmodule.c @@ -1772,7 +1772,7 @@ queuesmod_get_queue_defaults(PyObject *self, PyObject *args, PyObject *kwds) } int64_t qid = qidarg.id; - struct _queuedefaults defaults; + struct _queuedefaults defaults = {0}; int err = queue_get_defaults(&_globals.queues, qid, &defaults); if (handle_queue_error(err, self, qid)) { return NULL; diff --git a/Python/crossinterp.c b/Python/crossinterp.c index 65ccab32daf730..26eecdddf4bdd0 100644 --- a/Python/crossinterp.c +++ b/Python/crossinterp.c @@ -1795,6 +1795,7 @@ typedef struct _sharednsitem { // in a different interpreter to release the XI data. } _PyXI_namespace_item; +#ifndef NDEBUG static int _sharednsitem_is_initialized(_PyXI_namespace_item *item) { @@ -1803,6 +1804,7 @@ _sharednsitem_is_initialized(_PyXI_namespace_item *item) } return 0; } +#endif static int _sharednsitem_init(_PyXI_namespace_item *item, PyObject *key)