mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-120321: Avoid -Wunreachable-code warning on Clang (gh-143022)
This commit is contained in:
parent
3cc57505e5
commit
7607712b61
1 changed files with 2 additions and 1 deletions
|
|
@ -422,7 +422,8 @@ gen_close(PyObject *self, PyObject *args)
|
|||
int8_t frame_state = FT_ATOMIC_LOAD_INT8_RELAXED(gen->gi_frame_state);
|
||||
do {
|
||||
if (frame_state == FRAME_CREATED) {
|
||||
if (!_Py_GEN_TRY_SET_FRAME_STATE(gen, frame_state, FRAME_CLEARED)) {
|
||||
// && (1) to avoid -Wunreachable-code warning on Clang
|
||||
if (!_Py_GEN_TRY_SET_FRAME_STATE(gen, frame_state, FRAME_CLEARED) && (1)) {
|
||||
continue;
|
||||
}
|
||||
gen_clear_frame(gen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue