Date: Sat, 23 Jul 2022 08:59:05 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1b709e6fb254 - stable/12 - Fix unused variable warning in acpica's nsaccess.c Message-ID: <202207230859.26N8x5q8013443@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1b709e6fb254e370a7980eb0dc9ad665cfcde6ba commit 1b709e6fb254e370a7980eb0dc9ad665cfcde6ba 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:57:44 +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 658df6a0c862..6bcc36d58e35 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -441,7 +441,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207230859.26N8x5q8013443>