mirror of
https://github.com/python/cpython.git
synced 2026-01-26 12:55:08 +00:00
gh-120321: Avoid -Wunreachable-code warning on Clang (gh-143022)
This commit is contained in:
parent
3cc57505e5
commit
7607712b61
@ -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…
x
Reference in New Issue
Block a user