Date: Mon, 2 Jan 2012 13:17:31 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r229278 - stable/9/sys/conf Message-ID: <201201021317.q02DHVqA068501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201021317.q02DHVqA068501>