From owner-svn-src-all@FreeBSD.ORG Thu Dec 15 22:08:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAAE1065677; Thu, 15 Dec 2011 22:08:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1BE8FC18; Thu, 15 Dec 2011 22:08:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBFM88Hk072824; Thu, 15 Dec 2011 22:08:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBFM88hK072822; Thu, 15 Dec 2011 22:08:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112152208.pBFM88hK072822@svn.freebsd.org> From: Dimitry Andric Date: Thu, 15 Dec 2011 22:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228546 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 22:08:08 -0000 Author: dim Date: Thu Dec 15 22:08:08 2011 New Revision: 228546 URL: http://svn.freebsd.org/changeset/base/228546 Log: Clang has more warnings enabled by default, and when using -Wall, so if WARNS is set to low values, some of them have to be disabled explicitly. MFC after: 1 week Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Thu Dec 15 22:07:36 2011 (r228545) +++ head/share/mk/bsd.sys.mk Thu Dec 15 22:08:08 2011 (r228546) @@ -57,6 +57,19 @@ CWARNFLAGS += -Wchar-subscripts -Winline CWARNFLAGS += -Wno-uninitialized . endif CWARNFLAGS += -Wno-pointer-sign +# Clang has more warnings enabled by default, and when using -Wall, so if WARNS +# is set to low values, these have to be disabled explicitly. +. if ${CC:T:Mclang} == "clang" +. if ${WARNS} <= 3 +CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value +. endif +. if ${WARNS} <= 2 +CWARNFLAGS += -Wno-switch-enum +. endif +. if ${WARNS} <= 1 +CWARNFLAGS += -Wno-parentheses +. endif +. endif . endif . if defined(FORMAT_AUDIT)