From: Stan Ulbrych Date: Sun, 5 Apr 2026 18:22:10 +0000 (+0100) Subject: Silence `unused-variable` warnings in `optimizer_cases.c.h` (#148127) X-Git-Tag: v3.15.0a8~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6e044512c59ab7b83f14e00e7047756a31ac3e3;p=thirdparty%2FPython%2Fcpython.git Silence `unused-variable` warnings in `optimizer_cases.c.h` (#148127) --- diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index f2645553513f..b8148ef57ede 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -2124,18 +2124,21 @@ dummy_func(void) { } op(_GUARD_CODE_VERSION_RETURN_VALUE, (version/2 -- )) { + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); } } op(_GUARD_CODE_VERSION_YIELD_VALUE, (version/2 -- )) { + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); } } op(_GUARD_CODE_VERSION_RETURN_GENERATOR, (version/2 -- )) { + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); } diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index fb3ec39a42ea..a15b5ae1d13d 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -5092,6 +5092,7 @@ case _GUARD_CODE_VERSION_YIELD_VALUE: { uint32_t version = (uint32_t)this_instr->operand0; + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); } @@ -5100,6 +5101,7 @@ case _GUARD_CODE_VERSION_RETURN_VALUE: { uint32_t version = (uint32_t)this_instr->operand0; + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); } @@ -5108,6 +5110,7 @@ case _GUARD_CODE_VERSION_RETURN_GENERATOR: { uint32_t version = (uint32_t)this_instr->operand0; + (void)version; if (ctx->frame->caller) { REPLACE_OP(this_instr, _NOP, 0, 0); }