From 21e44a20b8b1b64079ee77f45aaa5010206ed7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 12 May 2011 09:23:38 +0200 Subject: UMS: Fix comparison of unsigned variable against < 0. Pointed out by clang: ../../src/radeon_crtc.c:242:18: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] error = error < 0 ? 0xffffffff : error; ~~~~~ ^ ~ If a UMS regression is bisected to this commit, the assignment should probably just be removed, as it's a no-op in the current form. --- src/radeon_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index d84112e6..3c037001 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -239,7 +239,7 @@ RADEONComputePLL_old(RADEONPLLPtr pll, if (flags & RADEON_PLL_PREFER_CLOSEST_LOWER) { error = freq - current_freq; - error = error < 0 ? 0xffffffff : error; + error = (int32_t)error < 0 ? 0xffffffff : error; } else error = abs(current_freq - freq); vco_diff = abs(vco - best_vco); -- cgit v1.2.3