]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Silence `unused-variable` warnings in `optimizer_cases.c.h` (#148127)
authorStan Ulbrych <stan@python.org>
Sun, 5 Apr 2026 18:22:10 +0000 (19:22 +0100)
committerGitHub <noreply@github.com>
Sun, 5 Apr 2026 18:22:10 +0000 (19:22 +0100)
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h

index f2645553513f3da829e23b7b1f78cc0875e535a6..b8148ef57ede0c177a724b3027a6e63f2b4bc97f 100644 (file)
@@ -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);
         }
index fb3ec39a42eabcad1cf4e7a764be7eb340aa0dc0..a15b5ae1d13d3bc3759de8b0bc5ce59a21bae5d8 100644 (file)
 
         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);
             }
 
         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);
             }
 
         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);
             }