git: 488c498b099e - main - Disable errors for -Wnonnull for the kernel for GCC 12.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Dec 2022 18:49:41 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=488c498b099e3f48db4048833d2b0d03d7bed3e1
commit 488c498b099e3f48db4048833d2b0d03d7bed3e1
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-21 18:46:06 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
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