]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132775: Fix Recently Introduced Warnings (gh-134530)
authorEric Snow <ericsnowcurrently@gmail.com>
Thu, 22 May 2025 17:24:09 +0000 (11:24 -0600)
committerGitHub <noreply@github.com>
Thu, 22 May 2025 17:24:09 +0000 (17:24 +0000)
Modules/_interpchannelsmodule.c
Modules/_interpqueuesmodule.c
Python/crossinterp.c

index 0ab553190001bd508ba2ce521b6df18abcbf1225..bfd805bf5e407247867c2356f0a0f7e6d0b0a055 100644 (file)
@@ -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;
index 816285c9eff44ab4443ba140d6c93cc19862c1de..ffc52c8ee74d85612a46429ae387ee3faf71fd77 100644 (file)
@@ -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;
index 65ccab32daf730056de023eea1d5048655f35d12..26eecdddf4bdd0ee5608778e6fb9dcdd47a285a0 100644 (file)
@@ -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)