Module: wine Branch: master Commit: 7ee0578019e0d8ae10d48163f49c28996a4e4b6c URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ee0578019e0d8ae10d48163f4...
Author: Matteo Bruni mbruni@codeweavers.com Date: Thu Oct 8 01:26:41 2015 +0200
d3d9/tests: Fix color_match().
Clang on OS X complains about calling abs() on an unsigned value.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3d9/tests/visual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index a9b1ade..49f3ad4 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -65,13 +65,13 @@ static HWND create_window(void)
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; - 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; - 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; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + if (abs((int)(c1 & 0xff) - (int)(c2 & 0xff)) > max_diff) return FALSE; return TRUE; }