]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r228781:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 2 Jan 2012 12:53:11 +0000 (12:53 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 2 Jan 2012 12:53:11 +0000 (12:53 +0000)
commitc4156406850c6803ad20e0cf84e1dd0fe1fb6d72
treed9773833f956861790a912552f91e97a5bf0930e
parentb6d5c1d2434584dbce0d2177fdf8ba8d399cfe1e
MFC r228781:

  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 r228865:

  Amend r228781 by also disabling -Warray-bounds warnings for the asr
  module.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/conf/files
sys/conf/kern.mk
sys/modules/asr/Makefile