Date: Wed, 20 Jul 2022 19:17:48 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3c9a0112bae6 - main - Fix unused variable warning in acpica's nsaccess.c Message-ID: <202207201917.26KJHmVI099661@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3c9a0112bae6408892123b04a6ba5c6ee0780937 commit 3c9a0112bae6408892123b04a6ba5c6ee0780937 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-20 19:10:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-20 19:10:43 +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 --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207201917.26KJHmVI099661>