aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-12-21 16:38:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-12-21 16:38:37 +0000
commitfea858696e48fa95961e0ad9c0faa5d0d50aa4c0 (patch)
treec5f60e3712d5c75bc1c457898552537dbe241e2c /sys/conf
parent05a636f0bdfa50e16807ba0e8615e5371453d4ee (diff)
downloadsrc-fea858696e48fa95961e0ad9c0faa5d0d50aa4c0.tar.gz
src-fea858696e48fa95961e0ad9c0faa5d0d50aa4c0.zip
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
Notes
Notes: svn path=/head/; revision=228781
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files3
-rw-r--r--sys/conf/kern.mk1
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files
index bf9cdaff1d19..7d8ce4bad65a 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -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
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 4b1afeeda86d..745b0e183eee 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -16,6 +16,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
# a false positive.
.if ${CC:T:Mclang} == "clang"
NO_WCONSTANT_CONVERSION= -Wno-constant-conversion
+NO_WARRAY_BOUNDS= -Wno-array-bounds
.endif
#