]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: remove shadow variable in xfs_btree_lshift
authorEric Sandeen <sandeen@redhat.com>
Sat, 14 Mar 2020 02:59:15 +0000 (22:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Sat, 14 Mar 2020 02:59:15 +0000 (22:59 -0400)
Source kernel commit: 5a57c05b56b6eb2b4e3eb2a9f205e39e849325a1

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_btree.c

index aae1d30f89dd105273cebff68cbeafd9a228d113..ead05a4648c918b273617ca5fd854f7792219328 100644 (file)
@@ -2386,8 +2386,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)