svn commit: r229278 - stable/9/sys/conf
Dimitry Andric
dim at FreeBSD.org
Mon Jan 2 13:17:32 UTC 2012
Author: dim
Date: Mon Jan 2 13:17:31 2012
New Revision: 229278
URL: http://svn.freebsd.org/changeset/base/229278
Log:
MFC r228822:
When building the kernel with clang, it produces several warnings which
might be useful in some cases, but which are not severe enough to error
out the whole kernel build. Display them anyway, so there is at least
some incentive to fix them eventually.
Start with -Wtautological-compare warnings. These usually occur when
people check if unsigned quantities are negative, or similar cases. To
clean these up would be painful, and might give problems if the base
type which is compared against changes to signed later on.
MFC r228841:
Amend r228822 by not directly adding to CWARNFLAGS, but to an optional
CWARNEXTRA variable, which gets included into the initial CWARNFLAGS
setting. This makes it easier to override CWARNFLAGS with completely
custom settings (including enabling any disabled warnings).
Reminded by: arundel
MFC r228860:
Make another clang warning, -Wempty-body, non-fatal during kernel
builds. All the instances of this warning in our tree are completely
harmless. (Most of the empty bodies look to be used simply as reminder
for the developer to add something later.)
While here, assign to CWARNEXTRA with ?=, so it can be overridden
easily, if needed.
MFC r228867:
Make another clang warning, -Wparentheses-equality, non-fatal during
kernel builds. All the instances of this warning in our tree are
completely harmless, and many people seem to like adding extra
parentheses to make precedence clearer.
Modified:
stable/9/sys/conf/kern.mk
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/conf/ (props changed)
Modified: stable/9/sys/conf/kern.mk
==============================================================================
--- stable/9/sys/conf/kern.mk Mon Jan 2 13:12:53 2012 (r229277)
+++ stable/9/sys/conf/kern.mk Mon Jan 2 13:17:31 2012 (r229278)
@@ -6,7 +6,8 @@
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wundef -Wno-pointer-sign -fformat-extensions \
- -Wmissing-include-dirs -fdiagnostics-show-option
+ -Wmissing-include-dirs -fdiagnostics-show-option \
+ ${CWARNEXTRA}
#
# The following flags are next up for working on:
# -Wextra
@@ -19,6 +20,11 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c
NO_WARRAY_BOUNDS= -Wno-array-bounds
NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative
NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow
+# Several other warnings which might be useful in some cases, but not severe
+# enough to error out the whole kernel build. Display them anyway, so there is
+# some incentive to fix them eventually.
+CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
+ -Wno-error-parentheses-equality
.endif
#
More information about the svn-src-stable-9
mailing list