Skip to content

Commit

Permalink
pythongh-118849: Fix "code will never be executed" warning in `dictob…
Browse files Browse the repository at this point in the history
…ject.c` (python#118850)
  • Loading branch information
sobolevn authored and SonicField committed May 10, 2024
1 parent a6bc4e3 commit 63af4b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 63af4b5

Please sign in to comment.