Skip to content

Commit 82abe75

Browse files
authored
pythongh-118849: Fix "code will never be executed" warning in dictobject.c (python#118850)
1 parent 8af84b5 commit 82abe75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5396,6 +5396,7 @@ static int
53965396
dictiter_iternext_threadsafe(PyDictObject *d, PyObject *self,
53975397
PyObject **out_key, PyObject **out_value)
53985398
{
5399+
int res;
53995400
dictiterobject *di = (dictiterobject *)self;
54005401
Py_ssize_t i;
54015402
PyDictKeysObject *k;
@@ -5491,7 +5492,6 @@ dictiter_iternext_threadsafe(PyDictObject *d, PyObject *self,
54915492
Py_DECREF(d);
54925493
return -1;
54935494

5494-
int res;
54955495
try_locked:
54965496
Py_BEGIN_CRITICAL_SECTION(d);
54975497
res = dictiter_iternextitem_lock_held(d, self, out_key, out_value);

0 commit comments

Comments
 (0)