8000 [3.13] gh-118849: Fix "code will never be executed" warning in `dictobject.c` (GH-118850) by miss-islington · Pull Request #118859 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-118849: Fix "code will never be executed" warning in dictobject.c (
GH-118850)

(cherry picked from commit 82abe75)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
sobolevn authored and miss-islington committed May 9, 2024
commit 9b2ac2eb03d284ba5f38506d2a0970f38924b8f7
2 changes: 1 addition & 1 deletion Objects/dictobject.c
79AF
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