summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorsobolevn <mail@sobolevn.me>2024-10-14 20:46:17 (GMT)
committerGitHub <noreply@github.com>2024-10-14 20:46:17 (GMT)
commit0c8c665581ede95fe119f902b070e395614b78ed (patch)
tree953659ba75c69da9b5bc1dcfa4ff269f69cd3030 /Python
parent843d28f59d2616d052d9d45f31823976da07f0f3 (diff)
downloadcpython-0c8c665581ede95fe119f902b070e395614b78ed.zip
cpython-0c8c665581ede95fe119f902b070e395614b78ed.tar.gz
cpython-0c8c665581ede95fe119f902b070e395614b78ed.tar.bz2
gh-125470: Fix warning in `Python/generated_cases.c.h` (#125471)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Diffstat (limited to 'Python')
-rw-r--r--Python/bytecodes.c2
-rw-r--r--Python/executor_cases.c.h2
-rw-r--r--Python/generated_cases.c.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index b22916a..e652565 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -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;
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 0ed361a..15a6c7b 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -737,7 +737,9 @@
_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
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 7bd1b7d..a929098 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -183,7 +183,9 @@
/* 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