We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-Wunreachable-code
1 parent 3cc5750 commit 7607712Copy full SHA for 7607712
Objects/genobject.c
@@ -422,7 +422,8 @@ gen_close(PyObject *self, PyObject *args)
422
int8_t frame_state = FT_ATOMIC_LOAD_INT8_RELAXED(gen->gi_frame_state);
423
do {
424
if (frame_state == FRAME_CREATED) {
425
- if (!_Py_GEN_TRY_SET_FRAME_STATE(gen, frame_state, FRAME_CLEARED)) {
+ // && (1) to avoid -Wunreachable-code warning on Clang
426
+ if (!_Py_GEN_TRY_SET_FRAME_STATE(gen, frame_state, FRAME_CLEARED) && (1)) {
427
continue;
428
}
429
gen_clear_frame(gen);
0 commit comments