[PATCH 2/2] xfs: rearrange xfs_mod_sb() to avoid array subscript warning

Christoph Hellwig hch at infradead.org
Tue Jan 19 03:23:20 CST 2010


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:


Reviewed-by: Christoph Hellwig <hch at lst.de>




More information about the xfs mailing list