[PATCH] amd_drv: Remove a few (harmless) warnings

Bernardo Innocenti bernie at codewiz.org
Sun Jan 13 16:47:45 PST 2008


Signed-off-by: Bernardo Innocenti <bernie at codewiz.org>
---
 src/amd_gx_driver.c |    4 ++--
 src/amd_lx_video.c  |   24 ++++++++++++++++++------
 src/durango.c       |    1 +
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index 0947f56..c66267e 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -522,7 +522,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
 		    &pGeode->tryHWCursor);
 
   if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_FBSIZE,
-			    &(pGeode->FBAvail)))
+			    (int *)&(pGeode->FBAvail)))
     pGeode->FBAvail = 0;
 
   /* For compatability - allow SWCursor too */
@@ -564,7 +564,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
     pGeode->NoOfColorExpandLines = 0;
 
   xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_CLR_BUFS,
-		       &(pGeode->exaBfrSz));
+		       (int *)&(pGeode->exaBfrSz));
 
   if (pGeode->exaBfrSz <= 0)
     pGeode->exaBfrSz = 0;
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c
index cd1190c..b26ea30 100644
--- a/src/amd_lx_video.c
+++ b/src/amd_lx_video.c
@@ -64,6 +64,18 @@
 #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
 #define ARRAY_SIZE(a) (sizeof((a)) / (sizeof(*(a))))
 
+/* Local function prototypes */
+static void
+LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit);
+
+static void
+LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height,
+		BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH);
+
+static void
+LXResetVideo(ScrnInfoPtr pScrni);
+
+
 static XF86VideoEncodingRec DummyEncoding[1] = {
   { 0, "XV_IMAGE", 1024, 1024, {1, 1} }
 };
@@ -359,8 +371,8 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf,
   return TRUE;
 }
 
-void  
-LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, 
+static void
+LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height,
 	       BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH)
 {
   long ystart, xend, yend;
@@ -605,8 +617,8 @@ LXSetPortAttribute(ScrnInfoPtr pScrni,
   return Success;
 }
 
-void 
-LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) 
+static void
+LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit)
 {
   GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data;
   GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -642,8 +654,8 @@ LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit)
     pPriv->offTime = currentTime.milliseconds + OFF_DELAY;
   }
 }
-    
-void
+
+static void
 LXResetVideo(ScrnInfoPtr pScrni)
 {
     GeodeRec *pGeode = GEODEPTR(pScrni);
diff --git a/src/durango.c b/src/durango.c
index 119459f..afd9456 100644
--- a/src/durango.c
+++ b/src/durango.c
@@ -37,6 +37,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <compiler.h>
+#include <os.h> /* ErrorF() */
 
 /* Compiler options */
 
-- 
1.5.3.3




More information about the xorg mailing list