From: hui su Date: Wed, 24 Feb 2016 19:17:33 +0000 (-0800) Subject: Fix some compiler warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8537826eb41770716e8dc7c69474960020515a09;p=libvpx Fix some compiler warnings. "taking the absolute value of unsigned type 'unsigned int' has no effect" Change-Id: Iea1f67c2a3171a98ca89d5dc7192a5508d086c16 --- diff --git a/vpx_dsp/fastssim.c b/vpx_dsp/fastssim.c index 9b10d3a8a..7d9089171 100644 --- a/vpx_dsp/fastssim.c +++ b/vpx_dsp/fastssim.c @@ -365,11 +365,11 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) { unsigned g2; unsigned gx; unsigned gy; - g1 = abs(im1[(j + 1) * w + i + 1] - im1[j * w + i]); - g2 = abs(im1[(j + 1) * w + i] - im1[j * w + i + 1]); + g1 = abs((int)im1[(j + 1) * w + i + 1] - (int)im1[j * w + i]); + g2 = abs((int)im1[(j + 1) * w + i] - (int)im1[j * w + i + 1]); gx = 4 * FS_MAXI(g1, g2) + FS_MINI(g1, g2); - g1 = abs(im2[(j + 1) * w + i + 1] - im2[j * w + i]); - g2 = abs(im2[(j + 1) * w + i] - im2[j * w + i + 1]); + g1 = abs((int)im2[(j + 1) * w + i + 1] - (int)im2[j * w + i]); + g2 = abs((int)im2[(j + 1) * w + i] - (int)im2[j * w + i + 1]); gy = 4 * FS_MAXI(g1, g2) + FS_MINI(g1, g2); gx_buf[(j & 7) * stride + i + 4] = gx; gy_buf[(j & 7) * stride + i + 4] = gy;