xfs
[Top] [All Lists]

Re: [PATCH 05/27] xfs: work around bogus gcc warning in xfs_allocbt_init

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 05/27] xfs: work around bogus gcc warning in xfs_allocbt_init_cursor
From: Alex Elder <aelder@xxxxxxx>
Date: Wed, 29 Jun 2011 17:13:09 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <20110629140337.417478423@xxxxxxxxxxxxxxxxxxxxxx>
References: <20110629140109.003209430@xxxxxxxxxxxxxxxxxxxxxx> <20110629140337.417478423@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Wed, 2011-06-29 at 10:01 -0400, Christoph Hellwig wrote:
> plain text document attachment
> (xfs-fix-xfs_allocbt_init_cursor-warning)
> GCC 4.6 complains about an array subscript is above array bounds when
> using the btree index to index into the agf_levels array.  The only
> two indices passed in are 0 and 1, and we have an assert insuring that.
> 
> Replace the trick of using the array index directly with using constants
> in the already existing branch for assigning the XFS_BTREE_LASTREC_UPDATE
> flag.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>


<Prev in Thread] Current Thread [Next in Thread>