summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh5
-rw-r--r--grammar.y.in8
2 files changed, 8 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index fa7809a7..d00bb500 100755
--- a/build.sh
+++ b/build.sh
@@ -54,11 +54,6 @@ clang-*/NetBSD-*)
# 'long' to 'suseconds_t' (aka 'int') [-Wshorten-64-to-32]
LIBPCAP_TAINTED=yes
;;
-clang-1[56].*/*)
- # grammar.c:1369:14: warning: variable 'pcap_nerrs' set but not used
- # [-Wunused-but-set-variable]
- LIBPCAP_TAINTED=yes
- ;;
clang-*/SunOS-5.11)
# (Solaris 11 and OpenIndiana)
# pcap-bpf.c:1044:18: warning: implicit conversion loses integer precision:
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