Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2023 00:29:38 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0218596e9220 - stable/13 - acpica: Quiet a -Wdangling-pointer warning in AcpiUtInitStackPtrTrace.
Message-ID:  <202305030029.3430TcF0071977@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0218596e92204dd3890cd9d1f3fc8fdffb1e770a

commit 0218596e92204dd3890cd9d1f3fc8fdffb1e770a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:28:59 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:05:54 +0000

    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
    
    (cherry picked from commit f4432625edd64df94ce7c2a085f256dbc4d2b215)
---
 usr.sbin/acpi/acpidb/Makefile | 4 ++++
 usr.sbin/acpi/iasl/Makefile   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile
index 5a6fceb2a4cb..ed28a26a67a7 100644
--- a/usr.sbin/acpi/acpidb/Makefile
+++ b/usr.sbin/acpi/acpidb/Makefile
@@ -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}
diff --git a/usr.sbin/acpi/iasl/Makefile b/usr.sbin/acpi/iasl/Makefile
index 1807156475b1..6b0e77d08de8 100644
--- a/usr.sbin/acpi/iasl/Makefile
+++ b/usr.sbin/acpi/iasl/Makefile
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305030029.3430TcF0071977>