diff options
author | Michel Dänzer <daenzer@vmware.com> | 2011-05-12 09:23:38 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2011-05-13 09:11:23 +0200 |
commit | 21e44a20b8b1b64079ee77f45aaa5010206ed7b6 (patch) | |
tree | 19643f55c332d35ead9341b754fbfd064fcf5464 | |
parent | 3b893d81982c9381393c92625e308541e0071b05 (diff) |
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.
-rw-r--r-- | src/radeon_crtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |