From: Nikita Sobolev Date: Thu, 9 May 2024 17:15:14 +0000 (+0300) Subject: gh-118849: Fix "code will never be executed" warning in `dictobject.c` (#118850) X-Git-Tag: v3.14.0a1~1952 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82abe75e77129bebb3c13d807e8040f6924194f6;p=thirdparty%2FPython%2Fcpython.git gh-118849: Fix "code will never be executed" warning in `dictobject.c` (#118850) --- diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b0fce09d7940..985a326a176c 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);