1# $FreeBSD: stable/11/sys/conf/kern.mk 361012 2020-05-13 18:09:03Z dim $
| 1# $FreeBSD: stable/11/sys/conf/kern.mk 370029 2021-06-22 19:49:31Z dim $
|
2 3# 4# Warning flags for compiling the kernel and components of the kernel: 5# 6CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ 7 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ 8 -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ 9 -Wmissing-include-dirs -fdiagnostics-show-option \ 10 -Wno-unknown-pragmas \ 11 ${CWARNEXTRA} 12# 13# The following flags are next up for working on: 14# -Wextra 15 16# Disable a few warnings for clang, since there are several places in the 17# kernel where fixing them is more trouble than it is worth, or where there is 18# a false positive. 19.if ${COMPILER_TYPE} == "clang"
| 2 3# 4# Warning flags for compiling the kernel and components of the kernel: 5# 6CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ 7 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ 8 -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ 9 -Wmissing-include-dirs -fdiagnostics-show-option \ 10 -Wno-unknown-pragmas \ 11 ${CWARNEXTRA} 12# 13# The following flags are next up for working on: 14# -Wextra 15 16# Disable a few warnings for clang, since there are several places in the 17# kernel where fixing them is more trouble than it is worth, or where there is 18# a false positive. 19.if ${COMPILER_TYPE} == "clang"
|
20NO_WCONSTANT_CONVERSION= -Wno-error-constant-conversion
| 20NO_WCONSTANT_CONVERSION= -Wno-error=constant-conversion
|
21NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative 22NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow 23NO_WSELF_ASSIGN= -Wno-self-assign
| 21NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative 22NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow 23NO_WSELF_ASSIGN= -Wno-self-assign
|
24NO_WUNNEEDED_INTERNAL_DECL= -Wno-error-unneeded-internal-declaration 25NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized 26NO_WCAST_QUAL= -Wno-error-cast-qual
| 24NO_WUNNEEDED_INTERNAL_DECL= -Wno-error=unneeded-internal-declaration 25NO_WSOMETIMES_UNINITIALIZED= -Wno-error=sometimes-uninitialized 26NO_WCAST_QUAL= -Wno-error=cast-qual
|
27NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare 28# Several other warnings which might be useful in some cases, but not severe 29# enough to error out the whole kernel build. Display them anyway, so there is 30# some incentive to fix them eventually.
| 27NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare 28# Several other warnings which might be useful in some cases, but not severe 29# enough to error out the whole kernel build. Display them anyway, so there is 30# some incentive to fix them eventually.
|
31CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ 32 -Wno-error-parentheses-equality -Wno-error-unused-function \ 33 -Wno-error-pointer-sign
| 31CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ 32 -Wno-error=parentheses-equality -Wno-error=unused-function \ 33 -Wno-error=pointer-sign
|
34.if ${COMPILER_VERSION} >= 30700
| 34.if ${COMPILER_VERSION} >= 30700
|
35CWARNEXTRA+= -Wno-error-shift-negative-value
| 35CWARNEXTRA+= -Wno-error=shift-negative-value
|
36.endif 37.if ${COMPILER_VERSION} >= 40000 38CWARNEXTRA+= -Wno-address-of-packed-member 39.endif 40.if ${COMPILER_VERSION} >= 100000 41NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation 42.endif 43
--- 234 unchanged lines hidden --- | 36.endif 37.if ${COMPILER_VERSION} >= 40000 38CWARNEXTRA+= -Wno-address-of-packed-member 39.endif 40.if ${COMPILER_VERSION} >= 100000 41NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation 42.endif 43
--- 234 unchanged lines hidden --- |