BuildHuffmanTable: clear int sanitizer warning

clears a warning of the form:
implicit conversion from type 'int' of value -1 (32-bit, signed) to type
'uint32_t' (aka 'unsigned int') changed the value to 4294967295 (32-bit,
unsigned)

Bug: b/229626362
Change-Id: I397fbd59bd3e6d787fcec1344b6230958b28d22c
This commit is contained in:
James Zern 2022-08-03 15:28:46 -07:00
parent 3a9a4d4589
commit 892cf033b9

View File

@ -142,7 +142,7 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
{ {
int step; // step size to replicate values in current table int step; // step size to replicate values in current table
uint32_t low = -1; // low bits for current root entry uint32_t low = 0xffffffffu; // low bits for current root entry
uint32_t mask = total_size - 1; // mask for low bits uint32_t mask = total_size - 1; // mask for low bits
uint32_t key = 0; // reversed prefix code uint32_t key = 0; // reversed prefix code
int num_nodes = 1; // number of Huffman tree nodes int num_nodes = 1; // number of Huffman tree nodes