From 3c9a0112bae6408892123b04a6ba5c6ee0780937 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 20 Jul 2022 21:10:43 +0200 Subject: [PATCH] Fix unused variable warning in acpica's nsaccess.c With clang 15, the following -Werror warning is produced: sys/contrib/dev/acpica/components/namespace/nsaccess.c:452:29: error: variable 'NumCarats' set but not used [-Werror,-Wunused-but-set-variable] UINT32 NumCarats; ^ Here, 'NumCarats' is a variable that is only used when debugging. Since acpica is contributed code, suppress the warning with a compile flag. MFC after: 3 days --- sys/conf/files | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index b8339ba7fda7..b934bf5124b2 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -494,7 +494,8 @@ contrib/dev/acpica/components/hardware/hwtimer.c optional acpi contrib/dev/acpica/components/hardware/hwvalid.c optional acpi contrib/dev/acpica/components/hardware/hwxface.c optional acpi contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi -contrib/dev/acpica/components/namespace/nsaccess.c optional acpi +contrib/dev/acpica/components/namespace/nsaccess.c optional acpi \ + compile-with "${NORMAL_C} ${NO_WUNUSED_BUT_SET_VARIABLE}" contrib/dev/acpica/components/namespace/nsalloc.c optional acpi contrib/dev/acpica/components/namespace/nsarguments.c optional acpi contrib/dev/acpica/components/namespace/nsconvert.c optional acpi