From owner-svn-src-head@FreeBSD.ORG Wed Dec 21 16:38:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84922106566C; Wed, 21 Dec 2011 16:38:38 +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 73FC28FC15; Wed, 21 Dec 2011 16:38:38 +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 pBLGccvT077144; Wed, 21 Dec 2011 16:38:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLGccDC077141; Wed, 21 Dec 2011 16:38:38 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211638.pBLGccDC077141@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 16:38:38 +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: r228781 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 16:38:38 -0000 Author: dim Date: Wed Dec 21 16:38:37 2011 New Revision: 228781 URL: http://svn.freebsd.org/changeset/base/228781 Log: When building with clang, disable -Warray-bounds for sys/dev/asr/asr.c, as it gets the following warning: sys/dev/asr/asr.c:1836:29: warning: array index of '58' indexes past the end of an array (that contains 1 element) [-Warray-bounds] while ((len > 0) && (sg < &((PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE) ^ sys/dev/asr/i2omsg.h:934:8: note: array 'Simple' declared here I2O_SGE_SIMPLE_ELEMENT Simple[1]; ^ This is a false positive, since I2O_SG_ELEMENT::Simple is not declared as a C99 flexible array member, but in the old (but more portable) way. At run-time, the proper number of array elements will hopefully have been allocated. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 21 16:36:07 2011 (r228780) +++ head/sys/conf/files Wed Dec 21 16:38:37 2011 (r228781) @@ -531,7 +531,8 @@ dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci -dev/asr/asr.c optional asr pci +dev/asr/asr.c optional asr pci \ + compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}" # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Dec 21 16:36:07 2011 (r228780) +++ head/sys/conf/kern.mk Wed Dec 21 16:38:37 2011 (r228781) @@ -16,6 +16,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # a false positive. .if ${CC:T:Mclang} == "clang" NO_WCONSTANT_CONVERSION= -Wno-constant-conversion +NO_WARRAY_BOUNDS= -Wno-array-bounds .endif #