https://github.com/python/cpython/commit/4298d69d4b2f7d0e9d93ad325238930bd6235dbf
commit: 4298d69d4b2f7d0e9d93ad325238930bd6235dbf
branch: main
author: Ken Jin <[email protected]>
committer: Fidget-Spinner <[email protected]>
date: 2024-03-08T00:19:59+08:00
summary:

gh-116420: Fix unused var compilation warnings (GH-116466)

Fix unused var compilation warnings

files:
M Python/optimizer_bytecodes.c
M Python/optimizer_cases.c.h

diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c
index 07a1adb8cb8a78..e3f7c9822103e6 100644
--- a/Python/optimizer_bytecodes.c
+++ b/Python/optimizer_bytecodes.c
@@ -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));
     }
 
diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h
index a19010cc403681..e4384975643ecd 100644
--- a/Python/optimizer_cases.c.h
+++ b/Python/optimizer_cases.c.h
@@ -1135,6 +1135,8 @@
             _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));
             }
@@ -1152,6 +1154,8 @@
             _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;
@@ -1164,6 +1168,8 @@
             _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;
@@ -1176,6 +1182,8 @@
             _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;
@@ -1188,6 +1196,8 @@
             _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;
@@ -1200,6 +1210,8 @@
             _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;

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to