git: f64d11ddb656 - stable/13 - Fix unused variable warning in acpica's nsaccess.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Jul 2022 08:58:24 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f64d11ddb6564ff1542b87cce38b60df6ebd3ee2 commit f64d11ddb6564ff1542b87cce38b60df6ebd3ee2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-20 19:10:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-23 08:56:45 +0000 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 (cherry picked from commit 3c9a0112bae6408892123b04a6ba5c6ee0780937) --- sys/conf/files | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 525b998145a8..a8f79140d7d9 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -510,7 +510,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