From fdd8792ebc1acd3fe2b7b9dabdba742475860312 Mon Sep 17 00:00:00 2001 From: Phil Turnbull Date: Wed, 14 Jun 2017 09:52:55 -0400 Subject: [PATCH] Correctly set is_first From scan-build: Value stored to 'is_first' is never read --- src/compiler/build_tables/build_parse_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/build_tables/build_parse_table.cc b/src/compiler/build_tables/build_parse_table.cc index 50c84af7..ca9405a0 100644 --- a/src/compiler/build_tables/build_parse_table.cc +++ b/src/compiler/build_tables/build_parse_table.cc @@ -646,8 +646,8 @@ class ParseTableBuilder { if (considered_associativity) { description += " " + to_string(resolution_count++) + ": "; description += "Specify a left or right associativity in"; + bool is_first = true; for (const ParseAction &action : entry.actions) { - bool is_first = true; if (action.type == ParseActionTypeReduce) { if (!is_first) description += " and"; description += " `" + symbol_name(action.symbol) + "`";