Skip to content

Commit

Permalink
btrfs: scrub: remove redundant initialization of increment
Browse files Browse the repository at this point in the history
increment is being initialized to map->stripe_len but this is never
read as increment is overwritten later on. Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

fs/btrfs/scrub.c:3193:6: warning: Value stored to 'increment' during its
initialization is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Jiapeng Chong authored and David Sterba committed Mar 14, 2022
1 parent c4bf190 commit 5c07c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3190,7 +3190,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
u64 generation;
int mirror_num;
struct btrfs_key key;
u64 increment = map->stripe_len;
u64 increment;
u64 offset;
u64 extent_logical;
u64 extent_physical;
Expand Down

0 comments on commit 5c07c53

Please sign in to comment.