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
This is a multi-part message in MIME format. --------------060400090309000706020004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060400090309000706020004 Content-Type: text/plain; charset=UTF-8; name="ath_patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ath_patch.txt" 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 { --------------060400090309000706020004--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50391B6A.5010302>