Skip to content

Commit

Permalink
udf: remove redundant assignment of variable etype
Browse files Browse the repository at this point in the history
Variable etype is being assigned a value that is never read. The
variable and assignment are redundant and can be removed.

Cleans up clang scan build warning:
fs/udf/super.c:2485:10: warning: Although the value stored to 'etype'
is used in the enclosing expression, the value is never actually read
from 'etype' [deadcode.DeadStores]

Link: https://lore.kernel.org/r/20220307152149.139045-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Colin Ian King authored and Jan Kara committed Mar 8, 2022
1 parent eb103a5 commit 31e9dc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2474,15 +2474,14 @@ static unsigned int udf_count_free_table(struct super_block *sb,
unsigned int accum = 0;
uint32_t elen;
struct kernel_lb_addr eloc;
int8_t etype;
struct extent_position epos;

mutex_lock(&UDF_SB(sb)->s_alloc_mutex);
epos.block = UDF_I(table)->i_location;
epos.offset = sizeof(struct unallocSpaceEntry);
epos.bh = NULL;

while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1)
while (udf_next_aext(table, &epos, &eloc, &elen, 1) != -1)
accum += (elen >> table->i_sb->s_blocksize_bits);

brelse(epos.bh);
Expand Down

0 comments on commit 31e9dc4

Please sign in to comment.