acpica: Quiet a -Wdangling-pointer warning in AcpiUtInitStackPtrTrace.

This function intentionally saves a pointer to an on-stack variable in
a global as a dubious way of reading the stack pointer.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37535
This commit is contained in:
John Baldwin 2022-12-04 16:28:59 -08:00
parent 1055bedbed
commit f4432625ed
2 changed files with 8 additions and 0 deletions

View file

@ -90,3 +90,7 @@ LIBADD= pthread
.if ${COMPILER_TYPE} == "clang"
CWARNFLAGS+= -Wno-null-pointer-arithmetic
.endif
# AcpiUtInitStackPtrTrace intentionally leaks a pointer to an
# on-stack variable.
CWARNFLAGS.utdebug.c+= ${NO_WDANGLING_POINTER}

View file

@ -147,4 +147,8 @@ prparserparse.c prparserparse.h: prparser.y
prparser.y.h: prparserparse.h .NOMETA
ln -f ${.ALLSRC} ${.TARGET}
# AcpiUtInitStackPtrTrace intentionally leaks a pointer to an
# on-stack variable.
CWARNFLAGS.utdebug.c+= ${NO_WDANGLING_POINTER}
.include <bsd.prog.mk>