summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-09 17:40:48 (GMT)
committerGitHub <noreply@github.com>2024-05-09 17:40:48 (GMT)
commit098eec9a1549b39ca55cfd59a9432698bfa07773 (patch)
tree5d9be167ead931a973d48ebec3ec6ebc806e017c /Objects
parent9d646d084c6fec83bed7bfa72d83b2ae3cf09644 (diff)
downloadcpython-098eec9a1549b39ca55cfd59a9432698bfa07773.zip
cpython-098eec9a1549b39ca55cfd59a9432698bfa07773.tar.gz
cpython-098eec9a1549b39ca55cfd59a9432698bfa07773.tar.bz2
[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 <mail@sobolevn.me>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index b0fce09..985a326 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 @@ fail:
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);