diff options
author | dim <dim@FreeBSD.org> | 2011-12-21 16:38:37 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-21 16:38:37 +0000 |
commit | 1c33a1d2d2e8e17d9025181d92863f8f8c10ba0b (patch) | |
tree | c5f60e3712d5c75bc1c457898552537dbe241e2c /sys/conf/kern.mk | |
parent | 5e6e71cda9cf20296c3b8e65a74dac893a0786af (diff) | |
download | FreeBSD-src-1c33a1d2d2e8e17d9025181d92863f8f8c10ba0b.zip FreeBSD-src-1c33a1d2d2e8e17d9025181d92863f8f8c10ba0b.tar.gz |
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
Diffstat (limited to 'sys/conf/kern.mk')
-rw-r--r-- | sys/conf/kern.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 4b1afee..745b0e1 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 # |