xf86-video-intel: src/i830_driver.c

Zhenyu Wang zhen at kemper.freedesktop.org
Sun Apr 19 18:54:44 PDT 2009


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

New commits:
commit 08ebde4715b87867184d42b60762cd774e151f5c
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Apr 20 09:43:09 2009 +0800

    fix overflow warning on videoRam
    
    Note that pScrn->videoRam is an 'int'.
    
    i830_driver.c: In function ‘I830ScreenInit’:
    i830_driver.c:3019: warning: overflow in implicit constant conversion
    
    Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6ff5a1d..6ec2cdd 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3016,7 +3016,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    if (pI830->use_drm_mode) {
 #ifdef XF86DRM_MODE
        pI830->stolen_size = 0;
-       pScrn->videoRam = ~0UL / KB(1);
+       pScrn->videoRam = INT_MAX / KB(1);
 #endif
    } else {
        I830AdjustMemory(pScreen);


More information about the xorg-commit mailing list