From 32cf880132a651855de59fb0adc3a5ee6cfe2e24 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 31 May 2019 00:06:23 -0700 Subject: [PATCH] predictor_enc,GetBestGreenRedToBlue: quiet implicit conv warnings no change in object code from clang-7 -fsanitize=implicit-integer-truncation implicit conversion from type 'int' of value -16 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 240 (8-bit, unsigned) Change-Id: Ia7cbaad247ab22b505b7f98b1247219c024f6db0 --- src/enc/predictor_enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/enc/predictor_enc.c b/src/enc/predictor_enc.c index ea63dce4..2e6762ea 100644 --- a/src/enc/predictor_enc.c +++ b/src/enc/predictor_enc.c @@ -666,8 +666,8 @@ static void GetBestGreenRedToBlue( break; // out of iter-loop. } } - best_tx->green_to_blue_ = green_to_blue_best; - best_tx->red_to_blue_ = red_to_blue_best; + best_tx->green_to_blue_ = green_to_blue_best & 0xff; + best_tx->red_to_blue_ = red_to_blue_best & 0xff; } #undef kGreenRedToBlueMaxIters #undef kGreenRedToBlueNumAxis