mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-21 19:32:52 +01:00
dsp/lossless_enc.c: clear int sanitizer warnings
in TransformColorBlue; make new_blue an int to avoid: implicit conversion from type 'int' of value 264 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 8 (8-bit, unsigned) Bug: b/229626362 Change-Id: Ife276a59231075788396204e1a192f3b0c6d9e21
This commit is contained in:
parent
129cf9e97e
commit
e2fecc22e1
@ -569,7 +569,7 @@ static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue,
|
|||||||
uint32_t argb) {
|
uint32_t argb) {
|
||||||
const int8_t green = U32ToS8(argb >> 8);
|
const int8_t green = U32ToS8(argb >> 8);
|
||||||
const int8_t red = U32ToS8(argb >> 16);
|
const int8_t red = U32ToS8(argb >> 16);
|
||||||
uint8_t new_blue = argb & 0xff;
|
int new_blue = argb & 0xff;
|
||||||
new_blue -= ColorTransformDelta((int8_t)green_to_blue, green);
|
new_blue -= ColorTransformDelta((int8_t)green_to_blue, green);
|
||||||
new_blue -= ColorTransformDelta((int8_t)red_to_blue, red);
|
new_blue -= ColorTransformDelta((int8_t)red_to_blue, red);
|
||||||
return (new_blue & 0xff);
|
return (new_blue & 0xff);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user