]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-123553: Fix compiler warning in `Python/compile.c` (#123554)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Sun, 1 Sep 2024 06:29:34 +0000 (09:29 +0300)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 06:29:34 +0000 (06:29 +0000)
Python/compile.c

index 2419876e3b1408dd17f008f8e75ecb05307f599c..37db0d4f26ff150fd30f4c6f2d92d82d6908a539 100644 (file)
@@ -7476,12 +7476,14 @@ compiler_unit_metadata(struct compiler *c)
     return &c->u->u_metadata;
 }
 
+#ifndef NDEBUG
 static int
 compiler_is_top_level_await(struct compiler *c)
 {
     return c->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT &&
            c->u->u_ste->ste_type == ModuleBlock;
 }
+#endif
 
 // Merge *obj* with constant cache, without recursion.
 int