Skip to content

Commit

Permalink
bpo-40334: Support suppressing of multiple optional variables in Pegen (
Browse files Browse the repository at this point in the history
GH-20367)

(cherry picked from commit cba5031)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
  • Loading branch information
miss-islington and isidentical committed May 24, 2020
1 parent 1a4e9e6 commit 82c274e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/peg_generator/pegen/c_generator.py
Expand Up @@ -694,8 +694,8 @@ def visit_Alt(
if v == "_cut_var":
v += " = 0" # cut_var must be initialized
self.print(f"{var_type}{v};")
if v == "_opt_var":
self.print("UNUSED(_opt_var); // Silence compiler warnings")
if v.startswith("_opt_var"):
self.print(f"UNUSED({v}); // Silence compiler warnings")

with self.local_variable_context():
if is_loop:
Expand Down

0 comments on commit 82c274e

Please sign in to comment.