sys: Stop enabling -Wnested-externs.
clang doesn't implement this warning, so violations are only caught by
GCC. It is also no longer a common practice to use this as it was in
the original BSD code, so the need for the warning is not as important
as when it was used to do cleanups 20 years ago. A recent commit
(c3179891f8
) triggers this warning on
GCC, but that commit uses nested externs purposefully.
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D39214
This commit is contained in:
parent
ea8d3189e9
commit
90b90089b6
@ -3,7 +3,7 @@
|
||||
#
|
||||
# Warning flags for compiling the kernel and components of the kernel:
|
||||
#
|
||||
CWARNFLAGS?= -Wall -Wnested-externs -Wstrict-prototypes \
|
||||
CWARNFLAGS?= -Wall -Wstrict-prototypes \
|
||||
-Wmissing-prototypes -Wpointer-arith -Wcast-qual \
|
||||
-Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \
|
||||
-Wmissing-include-dirs -fdiagnostics-show-option \
|
||||
|
@ -225,7 +225,6 @@ CDDL_CFLAGS= \
|
||||
-Wno-duplicate-decl-specifier \
|
||||
-Wno-missing-braces \
|
||||
-Wno-missing-prototypes \
|
||||
-Wno-nested-externs \
|
||||
-Wno-parentheses \
|
||||
-Wno-pointer-arith \
|
||||
-Wno-strict-prototypes \
|
||||
|
@ -551,8 +551,7 @@ OPENZFS_CFLAGS= \
|
||||
-I${SYSDIR}/cddl/compat/opensolaris \
|
||||
-I${SYSDIR}/cddl/contrib/opensolaris/uts/common \
|
||||
-include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h
|
||||
OPENZFS_CWARNFLAGS= \
|
||||
-Wno-nested-externs
|
||||
OPENZFS_CWARNFLAGS=
|
||||
|
||||
.include <bsd.dep.mk>
|
||||
.include <bsd.clang-analyze.mk>
|
||||
|
@ -22,7 +22,6 @@ CFLAGS+=-fms-extensions
|
||||
|
||||
CFLAGS+=-Wredundant-decls
|
||||
CFLAGS+=-Wunused-variable
|
||||
CFLAGS+=-Wnested-externs
|
||||
CFLAGS+=-Woverflow
|
||||
CFLAGS+=-Wmissing-prototypes
|
||||
CFLAGS+=-Wparentheses
|
||||
|
Loading…
Reference in New Issue
Block a user