From owner-svn-src-all@FreeBSD.ORG Thu Mar 1 17:51:16 2012 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 7286E106567F; Thu, 1 Mar 2012 17:51:16 +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 42ECC8FC29; Thu, 1 Mar 2012 17:51:16 +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 q21HpGEZ089493; Thu, 1 Mar 2012 17:51:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q21HpGt4089490; Thu, 1 Mar 2012 17:51:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203011751.q21HpGt4089490@svn.freebsd.org> From: Dimitry Andric Date: Thu, 1 Mar 2012 17:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232348 - in stable/9/sys: conf modules/hpt27xx 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, 01 Mar 2012 17:51:16 -0000 Author: dim Date: Thu Mar 1 17:51:15 2012 New Revision: 232348 URL: http://svn.freebsd.org/changeset/base/232348 Log: MFC r231982: When building with clang, disable -Wformat-security for sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings: sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] S_IRUSR | S_IWUSR, driver_name); ^~~~~~~~~~~ @/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from: #define driver_name hpt27xx_driver_name ^~~~~~~~~~~~~~~~~~~ Since 'hpt27xx_driver_name' is a constant string symbol (coming from the proprietary hpt27xx_lib.o file), there is no security problem. Because this driver is provided by the vendor, and applying changes requires re-certification and other bureaucratic exercises, just disable the warning for now. Modified: stable/9/sys/conf/kern.mk stable/9/sys/modules/hpt27xx/Makefile 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 Thu Mar 1 17:35:16 2012 (r232347) +++ stable/9/sys/conf/kern.mk Thu Mar 1 17:51:15 2012 (r232348) @@ -22,6 +22,7 @@ NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-cou NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign +NO_WFORMAT_SECURITY= -Wno-format-security # 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. Modified: stable/9/sys/modules/hpt27xx/Makefile ============================================================================== --- stable/9/sys/modules/hpt27xx/Makefile Thu Mar 1 17:35:16 2012 (r232347) +++ stable/9/sys/modules/hpt27xx/Makefile Thu Mar 1 17:51:15 2012 (r232348) @@ -12,3 +12,6 @@ hpt27xx_lib.o: uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET} .include + +CWARNFLAGS.osm_bsd.c= ${NO_WFORMAT_SECURITY} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}