d3d8/tests: Avoid abs() on unsigned values in compare_mode().

Mostly because Clang complains.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chip Davis 2020-03-31 19:39:11 +04:30 committed by Alexandre Julliard
parent 49bf4a8707
commit 153e39fc98
1 changed files with 2 additions and 2 deletions

View File

@ -1388,8 +1388,8 @@ static int compare_mode(const void *a, const void *b)
{ {
const struct mode *mode_a = a; const struct mode *mode_a = a;
const struct mode *mode_b = b; const struct mode *mode_b = b;
unsigned int w = mode_a->w - mode_b->w; int w = mode_a->w - mode_b->w;
unsigned int h = mode_a->h - mode_b->h; int h = mode_a->h - mode_b->h;
return abs(w) >= abs(h) ? -w : -h; return abs(w) >= abs(h) ? -w : -h;
} }