lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220929140514.226807-1-jolsa@kernel.org>
Date:   Thu, 29 Sep 2022 16:05:13 +0200
From:   Jiri Olsa <jolsa@...nel.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Ingo Molnar <mingo@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Ian Rogers <irogers@...gle.com>,
        linux-perf-users@...r.kernel.org
Subject: [PATCH 1/2] perf tools: Fix bison object compilation with clang 15

Arnaldo reported compilation fail with clang 15:

    CC      util/parse-events-bison.o
  util/parse-events-bison.c:1401:9: error: variable 'parse_events_nerrs'
  set but not used [-Werror,-Wunused-but-set-variable]
      int yynerrs = 0;
        ^
  util/parse-events-bison.c:72:25: note: expanded from macro 'yynerrs'
  #define yynerrs         parse_events_nerrs
                        ^
  1 error generated.

Disabling -Wunused-but-set-variable check for bison object compilation.

Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
 tools/perf/util/Build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 8fd6dc8de521..d559c80559e3 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -270,7 +270,7 @@ CFLAGS_expr-flex.o          += $(flex_flags)
 bison_flags := -DYYENABLE_NLS=0
 BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
 ifeq ($(BISON_GE_35),1)
-  bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum
+  bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum -Wno-unused-but-set-variable
 else
   bison_flags += -w
 endif
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ