[PATCH 2/2] xfs: rearrange xfs_mod_sb() to avoid array subscript warning
Dave Chinner
david at fromorbit.com
Tue Jan 19 05:11:55 CST 2010
On Tue, Jan 19, 2010 at 04:23:20AM -0500, Christoph Hellwig wrote:
> On Tue, Jan 19, 2010 at 11:41:51AM +1100, Dave Chinner wrote:
> > gcc warns of an array subscript out of bounds in xfs_mod_sb().
> > The code is written in such a way that if the array subscript is
> > out of bounds, then it will assert fail. Rearrange the code to
> > avoid the bounds check warning.
>
> Does it avoid the warning also for non-debug builds where the assert
> goes away? Anyway, the reordering is correct, so:
Yes.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list