https://github.com/python/cpython/commit/098eec9a1549b39ca55cfd59a9432698bfa07773
commit: 098eec9a1549b39ca55cfd59a9432698bfa07773
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-05-09T17:40:48Z
summary:

[3.13] gh-118849: Fix "code will never be executed" warning in `dictobject.c` 
(GH-118850) (#118859)

gh-118849: Fix "code will never be executed" warning in `dictobject.c` 
(GH-118850)
(cherry picked from commit 82abe75e77129bebb3c13d807e8040f6924194f6)

Co-authored-by: Nikita Sobolev <[email protected]>

files:
M Objects/dictobject.c

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index b0fce09d7940e0..985a326a176c94 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -5396,6 +5396,7 @@ static int
 dictiter_iternext_threadsafe(PyDictObject *d, PyObject *self,
                              PyObject **out_key, PyObject **out_value)
 {
+    int res;
     dictiterobject *di = (dictiterobject *)self;
     Py_ssize_t i;
     PyDictKeysObject *k;
@@ -5491,7 +5492,6 @@ dictiter_iternext_threadsafe(PyDictObject *d, PyObject 
*self,
     Py_DECREF(d);
     return -1;
 
-    int res;
 try_locked:
     Py_BEGIN_CRITICAL_SECTION(d);
     res = dictiter_iternextitem_lock_held(d, self, out_key, out_value);

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to