xf86-video-ati: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Fri May 13 10:37:33 PDT 2011


 src/radeon_crtc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 21e44a20b8b1b64079ee77f45aaa5010206ed7b6
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Thu May 12 09:23:38 2011 +0200

    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.

diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index d84112e..3c03700 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);


More information about the xorg-commit mailing list