[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2] target/hexagon: suppress unused variable warning
From: |
Alessandro Di Federico |
Subject: |
[PATCH v2] target/hexagon: suppress unused variable warning |
Date: |
Wed, 21 Dec 2022 16:53:27 +0100 |
This patch manually suppresses a warning for an unused variable
(yynerrs) emitted by bison.
This warning has been triggered for the first time by clang 15.
This patch also disables `-Wextra`, which is not usually adopted in
QEMU. However, clang 15 triggers the warning fixed in this patch even in
absence of `-Wextra`.
Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
---
target/hexagon/idef-parser/idef-parser.y | 2 ++
target/hexagon/meson.build | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/hexagon/idef-parser/idef-parser.y
b/target/hexagon/idef-parser/idef-parser.y
index 8be44a0ad17..c14cb395005 100644
--- a/target/hexagon/idef-parser/idef-parser.y
+++ b/target/hexagon/idef-parser/idef-parser.y
@@ -99,6 +99,8 @@
/* Input file containing the description of each hexagon instruction */
input : instructions
{
+ /* Suppress warning about unused yynerrs */
+ (void) yynerrs;
YYACCEPT;
}
;
diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
index e8f250fcac5..c9d31d095ca 100644
--- a/target/hexagon/meson.build
+++ b/target/hexagon/meson.build
@@ -197,7 +197,6 @@ if idef_parser_enabled and 'hexagon-linux-user' in
target_dirs
idef_parser_dir / 'parser-helpers.c'],
include_directories: ['idef-parser', '../../include/'],
dependencies: [glib_dep],
- c_args: ['-Wextra'],
native: true
)
--
2.38.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH v2] target/hexagon: suppress unused variable warning,
Alessandro Di Federico <=