From 8673ff5a595dbdb1fdbcb490c287fae24600d260 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 6 Apr 2024 01:13:04 +1100 Subject: [PATCH] Replace empty rules with the `%empty` directive. This avoids a warning from bison. --- input/iptables-save/parser.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/input/iptables-save/parser.y b/input/iptables-save/parser.y index 0aadd845..db14b6e7 100644 --- a/input/iptables-save/parser.y +++ b/input/iptables-save/parser.y @@ -197,7 +197,7 @@ ast: table_list ast->list = $1; } -table_list: /* empty */ +table_list: %empty { $$ = NULL; } @@ -215,7 +215,7 @@ table: TOK_IPTS_TABLE TOK_IDENTIFIER rule_list TOK_COMMIT $$->rule_list = $3; } -rule_list: /* empty */ +rule_list: %empty { $$ = NULL; } @@ -250,7 +250,7 @@ rule_specification: option_list $$ = $1; } -option_list: /* empty */ +option_list: %empty { $$ = NULL; } @@ -588,7 +588,7 @@ identifier: TOK_IDENTIFIER $$->string = $2; } -opt_pkt_count: /* empty */ +opt_pkt_count: %empty { $$ = NULL; }