From: Eric Sandeen Date: Sat, 14 Mar 2020 02:59:15 +0000 (-0400) Subject: xfs: remove shadow variable in xfs_btree_lshift X-Git-Tag: v5.6.0-rc0~24 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3b33e29f98ac1d19847fab4d05278150c81fac7d;p=users%2Fhch%2Fxfsprogs.git xfs: remove shadow variable in xfs_btree_lshift 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c index aae1d30f8..ead05a464 100644 --- a/libxfs/xfs_btree.c +++ b/libxfs/xfs_btree.c @@ -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)