summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-05-08 19:43:22 -0700
committerGitHub <noreply@github.com>2023-05-08 19:43:22 -0700
commit286594fb12b237fb61b0f7ebd738bb04be8e72d6 (patch)
tree061cbc1c5ff93fb4a7e9403242683ba359dc5f42
parentd70e9a2b36a52f673dd35e8492dc862445c3207e (diff)
parent1ba2302a3379b1106cafa89808f83eaf44f1669d (diff)
downloadlibpcap-286594fb12b237fb61b0f7ebd738bb04be8e72d6.tar.gz
Merge pull request #1181 from guyharris/squelch-annoyig-warning
compiler: squelch set-but-not-used warning for yynerrs.
-rw-r--r--grammar.y.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/grammar.y.in b/grammar.y.in
index 8617f90b..77f92afb 100644
--- a/grammar.y.in
+++ b/grammar.y.in
@@ -434,6 +434,14 @@ DIAG_OFF_BISON_BYACC
%%
prog: null expr
{
+ /*
+ * I'm not sure we have a reason to use yynerrs, but it's
+ * declared, and incremented, whether we need it or not,
+ * which means tha Clang 15 will give a "used but not
+ * set" warning. This should suppress the warning for
+ * yynerrs without suppressing it for other variables.
+ */
+ (void) yynerrs;
CHECK_INT_VAL(finish_parse(cstate, $2.b));
}
| null