From: Johann Date: Wed, 18 Dec 2013 23:52:51 +0000 (-0800) Subject: Cast away Windows warning X-Git-Tag: v1.4.0~2794 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc2c62eba868a5ff6534b8002d2e7d22afd12888;p=libvpx Cast away Windows warning Subtracting the pointers promoted to a signed type. Change-Id: Ied0e822a1756ed7b2f514efafcb6dce4efb9b9d6 --- diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index eb2d8b561..42976a17a 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -77,7 +77,7 @@ static void setup_compound_reference(VP9_COMMON *cm) { } static int read_is_valid(const uint8_t *start, size_t len, const uint8_t *end) { - return len != 0 && len <= end - start; + return len != 0 && len <= (size_t)(end - start); } static int decode_unsigned_max(struct vp9_read_bit_buffer *rb, int max) { @@ -859,7 +859,7 @@ static size_t get_tile(const uint8_t *const data_end, size = read_be32(*data); *data += 4; - if (size > data_end - *data) + if (size > (size_t)(data_end - *data)) vpx_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt tile size"); } else {