git: 2637ed558baa - main - Disable -Wdangling-pointer for the kernel for GCC 12.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 21 Dec 2022 18:49:42 UTC
The branch main has been updated by jhb:

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

commit 2637ed558baacdab7a8cf789dca713bde5843e43
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-21 18:46:26 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-12-21 18:46:26 +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
---
 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 cd8107f61329..5231a289981e 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -78,7 +78,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