From: Colin Ian King Date: Wed, 6 Sep 2023 09:20:47 +0000 (+0200) Subject: xfs: remove redundant initializations of pointers drop_leaf and save_leaf X-Git-Tag: v6.5.0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d03a3c4b235c6ecdda9b27d5f31115ad710b5912;p=thirdparty%2Fxfsprogs-dev.git xfs: remove redundant initializations of pointers drop_leaf and save_leaf Source kernel commit: 347eb95b27eb97bebdc3ea7de23558216f4e2c90 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 6cac25312..ed81471ce 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -2290,8 +2290,6 @@ xfs_attr3_leaf_unbalance( trace_xfs_attr_leaf_unbalance(state->args); - drop_leaf = drop_blk->bp->b_addr; - save_leaf = save_blk->bp->b_addr; xfs_attr3_leaf_hdr_from_disk(state->args->geo, &drophdr, drop_leaf); xfs_attr3_leaf_hdr_from_disk(state->args->geo, &savehdr, save_leaf); entry = xfs_attr3_leaf_entryp(drop_leaf);