Date: Sat, 25 Aug 2012 19:37:30 +0100 From: Sevan / Venture37 <venture37@gmail.com> To: freebsd-wireless@freebsd.org Subject: ath(4) error: array index 21 is past the end of the array (which contains, 21 elements) Message-ID: <50391B6A.5010302@gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
On -CURRENT buildkernel fails when WITH_CLANG_IS_CC declared with:
/usr/src/sys/modules/ath/../../dev/ath/if_ath_debug.c:184:24: error:
array index 21 is past the end of the array (which contains
21 elements) [-Werror,-Warray-bounds]
eds->ds_hw[20], eds->ds_hw[21]);
^ ~~
@/dev/ath/ath_hal/ah_desc.h:229:2: note: array 'ds_hw' declared here
uint32_t ds_hw[21]; /* includes buf/len */
^
1 error generated.
*** [if_ath_debug.o] Error code 1
Attached patch bumps array size to 22 in decleration which stops the error.
Sevan
[-- Attachment #2 --]
Index: sys/dev/ath/ath_hal/ah_desc.h
===================================================================
--- sys/dev/ath/ath_hal/ah_desc.h (revision 239685)
+++ sys/dev/ath/ath_hal/ah_desc.h (working copy)
@@ -226,7 +226,7 @@
struct ath_desc_txedma {
uint32_t ds_info;
uint32_t ds_link;
- uint32_t ds_hw[21]; /* includes buf/len */
+ uint32_t ds_hw[22]; /* includes buf/len */
};
struct ath_desc_status {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50391B6A.5010302>
