xfs: remove shadow variable in xfs_btree_lshift
authorEric Sandeen <sandeen@redhat.com>
Thu, 2 Jan 2020 21:31:54 +0000 (13:31 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 7 Jan 2020 18:21:08 +0000 (10:21 -0800)
Sparse warns about a shadow variable in this function after the
Fixed: commit added another int i; with larger scope.  It's safe
to remove the one with the smaller scope to fix this shadow,
although the shadow itself is harmless.

Fixes: 2c813ad66a72 ("xfs: support btrees with overlapping intervals for keys")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_btree.c

index e2cc98931552949bc708095ce24f4e259070c462..b22c7e928eb1cf7481bc43cfad728b924cec2a1e 100644 (file)
@@ -2389,8 +2389,6 @@ xfs_btree_lshift(
        XFS_BTREE_STATS_ADD(cur, moves, rrecs - 1);
        if (level > 0) {
                /* It's a nonleaf. operate on keys and ptrs */
-               int                     i;              /* loop index */
-
                for (i = 0; i < rrecs; i++) {
                        error = xfs_btree_debug_check_ptr(cur, rpp, i + 1, level);
                        if (error)