Commit 7ee05780 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d9/tests: Fix color_match().

Clang on OS X complains about calling abs() on an unsigned value. Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cee9409a
...@@ -65,13 +65,13 @@ static HWND create_window(void) ...@@ -65,13 +65,13 @@ static HWND create_window(void)
static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff) static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff)
{ {
if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; if (abs((int)(c1 & 0xff) - (int)(c2 & 0xff)) > max_diff) return FALSE;
c1 >>= 8; c2 >>= 8; c1 >>= 8; c2 >>= 8;
if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; if (abs((int)(c1 & 0xff) - (int)(c2 & 0xff)) > max_diff) return FALSE;
c1 >>= 8; c2 >>= 8; c1 >>= 8; c2 >>= 8;
if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; if (abs((int)(c1 & 0xff) - (int)(c2 & 0xff)) > max_diff) return FALSE;
c1 >>= 8; c2 >>= 8; c1 >>= 8; c2 >>= 8;
if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; if (abs((int)(c1 & 0xff) - (int)(c2 & 0xff)) > max_diff) return FALSE;
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment