mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
VP8GetSigned: clear int sanitizer warnings
clears warnings of the form: implicit conversion from type 'int32_t' (aka 'int') of value -1 (32-bit, signed) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned) Bug: b/229626362 Change-Id: I956671d4fee482c97c67bbe94032a97da49b0f6d
This commit is contained in:
parent
704a3d0a1f
commit
3a9a4d4589
@ -148,9 +148,9 @@ int VP8GetSigned(VP8BitReader* WEBP_RESTRICT const br, int v,
|
|||||||
const range_t value = (range_t)(br->value_ >> pos);
|
const range_t value = (range_t)(br->value_ >> pos);
|
||||||
const int32_t mask = (int32_t)(split - value) >> 31; // -1 or 0
|
const int32_t mask = (int32_t)(split - value) >> 31; // -1 or 0
|
||||||
br->bits_ -= 1;
|
br->bits_ -= 1;
|
||||||
br->range_ += mask;
|
br->range_ += (range_t)mask;
|
||||||
br->range_ |= 1;
|
br->range_ |= 1;
|
||||||
br->value_ -= (bit_t)((split + 1) & mask) << pos;
|
br->value_ -= (bit_t)((split + 1) & (uint32_t)mask) << pos;
|
||||||
BT_TRACK(br);
|
BT_TRACK(br);
|
||||||
return (v ^ mask) - mask;
|
return (v ^ mask) - mask;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user