From e3b8abbc9b928e050690472b6b40e83e6f979a9e Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Tue, 10 Jan 2017 22:59:47 -0800 Subject: [PATCH] fix warning from static analysis. "-1 cannot be represented in type 'unsigned int'" Change-Id: I05abcb44af68f702ead5a7f24dc14aab31a2e4d9 --- src/enc/backward_references.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enc/backward_references.c b/src/enc/backward_references.c index 6eb7d30c..4c480f12 100644 --- a/src/enc/backward_references.c +++ b/src/enc/backward_references.c @@ -1576,7 +1576,7 @@ static int ComputeCacheEntropies(const uint32_t* argb, // Update the histograms for distance/length. int len = PixOrCopyLength(v); int code_dist, code_len, extra_bits; - uint32_t argb_prev = *argb - 1; + uint32_t argb_prev = *argb ^ 0xffffffffu; VP8LPrefixEncodeBits(len, &code_len, &extra_bits); VP8LPrefixEncodeBits(PixOrCopyDistance(v), &code_dist, &extra_bits); for (i = 1; i <= cache_bits_max; ++i) {