The branch main has been updated by jhb:

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

commit 488c498b099e3f48db4048833d2b0d03d7bed3e1
Author:     John Baldwin <[email protected]>
AuthorDate: 2022-12-21 18:46:06 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2022-12-21 18:46:06 +0000

    Disable errors for -Wnonnull for the kernel for GCC 12.
    
    The USB code and some other places raise false positives when a NULL
    pointer is passed to an inlined function along with a separate length
    and the compiler can't determine that the separate length of 0
    prevents the use of the NULL pointer.
    
    Differential Revision:  https://reviews.freebsd.org/D37627
---
 sys/conf/kern.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 78dedb8ff496..cd8107f61329 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -77,6 +77,9 @@ CWARNEXTRA+=  -Wno-error=packed-not-aligned
 .if ${COMPILER_VERSION} >= 90100
 CWARNEXTRA+=   -Wno-address-of-packed-member                   \
                -Wno-error=alloca-larger-than=
+.if ${COMPILER_VERSION} >= 120100
+CWARNEXTRA+=   -Wno-error=nonnull
+.endif
 .endif
 
 # GCC produces false positives for functions that switch on an

Reply via email to