We don't really control the small aspects of generated files and NetBSD
version has an unused variable that is then detected by gcc as warning that
is then promoted to error.

Signed-off-by: Vladimir Serbinenko <phco...@gmail.com>
From 2c05ed1ac720f99f94387dbb40558e7f3551e9ae Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phco...@gmail.com>
Date: Thu, 24 Aug 2023 02:32:26 +0200
Subject: [PATCH 02/14] Tolerate unused-but-set in generated lexer/bison files

We don't really control the small aspects of generated files and NetBSD
version has an unused variable that is then detected by gcc as warning that
is then promoted to error.

Signed-off-by: Vladimir Serbinenko <phco...@gmail.com>
---
 Makefile.util.def           | 2 +-
 grub-core/Makefile.core.def | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.util.def b/Makefile.util.def
index 6fe08efd8..9432365a9 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -55,7 +55,7 @@ library = {
 
 library = {
   name = libgrubmods.a;
-  cflags = '-fno-builtin -Wno-undef';
+  cflags = '-fno-builtin -Wno-undef -Wno-unused-but-set-variable';
   cppflags = '-I$(srcdir)/grub-core/lib/minilzo -I$(srcdir)/grub-core/lib/xzembed -I$(srcdir)/grub-core/lib/zstd -DMINILZO_HAVE_CONFIG_H';
 
   common_nodist = grub_script.tab.c;
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index d2cf29584..1571421d7 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1993,7 +1993,7 @@ module = {
   extra_dist = script/yylex.l;
   extra_dist = script/parser.y;
 
-  cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls';
+  cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls -Wno-unused-but-set-variable';
   cppflags = '$(CPPFLAGS_POSIX)';
 };
 
-- 
2.39.2

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to