[PATCH:xf86-video-s3virge 2/2] Add cast to remove a warning on 32-bit machines.

Thomas Klausner wiz at NetBSD.org
Mon Sep 28 13:49:22 PDT 2015


PCI_REGION_BASE returns a 64-bit value, which needs to be converted
down to 32-bit before it can be put into a 32-bit pointer.
---
 src/s3v_dga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/s3v_dga.c b/src/s3v_dga.c
index 0e603cf..0ab374d 100644
--- a/src/s3v_dga.c
+++ b/src/s3v_dga.c
@@ -337,7 +337,7 @@ S3V_OpenFramebuffer(
     S3VPtr ps3v = S3VPTR(pScrn);
 
     *name = NULL; 		/* no special device */
-    *mem = (unsigned char*)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM);
+    *mem = (unsigned char*)(uintptr_t)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM);
     *size = ps3v->videoRambytes;
     *offset = 0;
     *flags = DGA_NEED_ROOT;
-- 
2.5.2



More information about the xorg-devel mailing list