Skip to content

Commit 347eb95

Browse files
ColinIanKingDarrick J. Wong
authored andcommitted
xfs: remove redundant initializations of pointers drop_leaf and save_leaf
Pointers drop_leaf and save_leaf are initialized with values that are never read, they are being re-assigned later on just before they are used. Remove the redundant early initializations and keep the later assignments at the point where they are used. Cleans up two clang scan build warnings: fs/xfs/libxfs/xfs_attr_leaf.c:2288:29: warning: Value stored to 'drop_leaf' during its initialization is never read [deadcode.DeadStores] fs/xfs/libxfs/xfs_attr_leaf.c:2289:29: warning: Value stored to 'save_leaf' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
1 parent c3b880a commit 347eb95

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/xfs/libxfs/xfs_attr_leaf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,8 +2293,6 @@ xfs_attr3_leaf_unbalance(
22932293

22942294
trace_xfs_attr_leaf_unbalance(state->args);
22952295

2296-
drop_leaf = drop_blk->bp->b_addr;
2297-
save_leaf = save_blk->bp->b_addr;
22982296
xfs_attr3_leaf_hdr_from_disk(state->args->geo, &drophdr, drop_leaf);
22992297
xfs_attr3_leaf_hdr_from_disk(state->args->geo, &savehdr, save_leaf);
23002298
entry = xfs_attr3_leaf_entryp(drop_leaf);

0 commit comments

Comments
 (0)