]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125470: Fix warning in `Python/generated_cases.c.h` (#125471)
authorsobolevn <mail@sobolevn.me>
Mon, 14 Oct 2024 20:46:17 +0000 (23:46 +0300)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2024 20:46:17 +0000 (23:46 +0300)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Python/bytecodes.c
Python/executor_cases.c.h
Python/generated_cases.c.h

index b22916aeaa248b03124b534406eca62d0952b88a..e6525657cabc2b60433bc03ab2545400d2a12333 100644 (file)
@@ -611,7 +611,9 @@ dummy_func(
         // specializations, but there is no output.
         // At the end we just skip over the STORE_FAST.
         op(_BINARY_OP_INPLACE_ADD_UNICODE, (left, right --)) {
+        #ifndef NDEBUG
             PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
+        #endif
             PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
 
             int next_oparg;
index 0ed361a2ee7fb011bef2c5926b2c5550e1b97e16..15a6c7bc1a79668ac22cde31cdca3b272c0303fd 100644 (file)
             _PyStackRef left;
             right = stack_pointer[-1];
             left = stack_pointer[-2];
+            #ifndef NDEBUG
             PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
+            #endif
             PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
             int next_oparg;
             #if TIER_ONE
index 7bd1b7dd5aba2724c2e8252cab7e98386e320298..a9290986c24f4583ae9c31d8e9eb08beffae7b95 100644 (file)
             /* Skip 1 cache entry */
             // _BINARY_OP_INPLACE_ADD_UNICODE
             {
+                #ifndef NDEBUG
                 PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
+                #endif
                 PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
                 int next_oparg;
                 #if TIER_ONE