Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2023 00:29:43 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: ff01fd164655 - stable/13 - Disable errors for -Wnonnull for the kernel for GCC 12.
Message-ID:  <202305030029.3430Thgr072060@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=ff01fd164655b1ec9d0455c6a42ec5218a30b368

commit ff01fd164655b1ec9d0455c6a42ec5218a30b368
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-21 18:46:06 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:11:57 +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
    
    (cherry picked from commit 488c498b099e3f48db4048833d2b0d03d7bed3e1)
---
 sys/conf/kern.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index bed235cf1afe..5d902b340c2b 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -90,6 +90,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



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