Skip to content

Commit

Permalink
igzip: fix build warning
Browse files Browse the repository at this point in the history
Fix the following build issue by initializing look_back_dist to 0.

igzip/igzip_inflate.c: In function ‘decode_huffman_code_block_stateless_base’:
igzip/igzip_inflate.c:1727:36:
 warning: ‘look_back_dist’ may be used uninitialized  [-Wmaybe-uninitialized]

Signed-off-by: Pablo de Lara <[email protected]>
  • Loading branch information
pablodelara authored and tkanteck committed Nov 15, 2023
1 parent acbe0de commit e2acfbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion igzip/igzip_inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ int decode_huffman_code_block_stateless_base(struct inflate_state *state, uint8_
uint16_t next_lit;
uint8_t next_dist;
uint32_t repeat_length;
uint32_t look_back_dist;
uint32_t look_back_dist = 0;
uint64_t read_in_tmp;
int32_t read_in_length_tmp;
uint8_t *next_in_tmp, *next_out_tmp;
Expand Down

0 comments on commit e2acfbf

Please sign in to comment.