git: ea3bb92cc3e1 - stable/13 - Disable -Wdangling-pointer for the kernel for GCC 12.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 03 May 2023 00:29:46 UTC
The branch stable/13 has been updated by jhb:

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

commit ea3bb92cc3e196f45bd4612250494587a44a63fd
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-21 18:46:26 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:13:09 +0000

    Disable -Wdangling-pointer for the kernel for GCC 12.
    
    Some of the warnings raised in the kernel seem to be outright bugs in
    the compiler (e.g. the cases in ata_xpt.c and scsi_xpt.c).  Other
    cases are not fatal and it didn't seem to find any legitimate bugs in
    the kernel.
    
    Differential Revision:  https://reviews.freebsd.org/D37629
    
    (cherry picked from commit 2637ed558baacdab7a8cf789dca713bde5843e43)
---
 sys/conf/kern.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 5d902b340c2b..b50c82b7d913 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -91,7 +91,8 @@ CWARNEXTRA+=	-Wno-error=packed-not-aligned
 CWARNEXTRA+=	-Wno-address-of-packed-member			\
 		-Wno-error=alloca-larger-than=
 .if ${COMPILER_VERSION} >= 120100
-CWARNEXTRA+=	-Wno-error=nonnull
+CWARNEXTRA+=	-Wno-error=nonnull				\
+		-Wno-dangling-pointer
 .endif
 .endif