]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116420: Fix unused var compilation warnings (GH-116466)
authorKen Jin <kenjin@python.org>
Thu, 7 Mar 2024 16:19:59 +0000 (00:19 +0800)
committerGitHub <noreply@github.com>
Thu, 7 Mar 2024 16:19:59 +0000 (00:19 +0800)
Fix unused var compilation warnings

Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h

index 07a1adb8cb8a783fffc9b5aee0a917693b7d3409..e3f7c9822103e61e63d5a4328b77524063f988ef 100644 (file)
@@ -352,6 +352,8 @@ dummy_func(void) {
     }
 
     op(_COMPARE_OP, (left, right -- res)) {
+        (void)left;
+        (void)right;
         if (oparg & 16) {
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
         }
@@ -361,22 +363,32 @@ dummy_func(void) {
     }
 
     op(_COMPARE_OP_INT, (left, right -- res)) {
+        (void)left;
+        (void)right;
         OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
     }
 
     op(_COMPARE_OP_FLOAT, (left, right -- res)) {
+        (void)left;
+        (void)right;
         OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
     }
 
     op(_COMPARE_OP_STR, (left, right -- res)) {
+        (void)left;
+        (void)right;
         OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
     }
 
     op(_IS_OP, (left, right -- res)) {
+        (void)left;
+        (void)right;
         OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
     }
 
     op(_CONTAINS_OP, (left, right -- res)) {
+        (void)left;
+        (void)right;
         OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
     }
 
index a19010cc403681e8a3743f7b507db4b54cc3af66..e4384975643ecd3b3cf8fe002a2e9b8b995efec1 100644 (file)
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             if (oparg & 16) {
                 OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             }
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             stack_pointer[-2] = res;
             stack_pointer += -1;
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             stack_pointer[-2] = res;
             stack_pointer += -1;
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             stack_pointer[-2] = res;
             stack_pointer += -1;
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             stack_pointer[-2] = res;
             stack_pointer += -1;
             _Py_UopsSymbol *res;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            (void)left;
+            (void)right;
             OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyBool_Type));
             stack_pointer[-2] = res;
             stack_pointer += -1;