[PATCH 10/10] perf parse-events: Disable a subset of bison warnings

From: Ian Rogers
Date: Wed Jun 10 2020 - 17:51:36 EST


Rather than disable all warnings with -w, disable specific warnings.
Tested with GCC 9.3.0 and clang 9.0.1.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/Build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 68885bae466e..c1f872ab7748 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -229,9 +229,10 @@ flex_flags := -Wno-switch-enum -Wno-switch-default -Wno-unused-function -Wno-red
CFLAGS_parse-events-flex.o += $(flex_flags)
CFLAGS_pmu-flex.o += $(flex_flags)
CFLAGS_expr-flex.o += $(flex_flags)
-CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
-CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
-CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
+bison_flags := -DYYENABLE_NLS=0 -Wno-unused-parameter -Wno-nested-externs
+CFLAGS_parse-events-bison.o += $(bison_flags)
+CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
+CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)

$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
--
2.27.0.278.ge193c7cf3a9-goog