xserver: Branch 'master' - 8 commits

Keith Packard keithp at kemper.freedesktop.org
Wed May 26 15:01:29 PDT 2010


 Xext/xf86bigfont.c               |    4 --
 hw/dmx/glxProxy/g_renderswap.c   |   39 --------------------------
 hw/dmx/glxProxy/glxcmds.c        |    9 +-----
 hw/dmx/glxProxy/glxscreens.c     |    5 +--
 hw/dmx/glxProxy/glxsingle.c      |   13 ++++----
 hw/dmx/glxProxy/glxvendor.c      |    6 ++--
 hw/dmx/glxProxy/render2swap.c    |    6 ----
 hw/dmx/glxProxy/renderpixswap.c  |    2 -
 hw/dmx/input/dmxinputinit.c      |    1 
 hw/dmx/input/dmxxinput.c         |   57 ---------------------------------------
 hw/kdrive/ephyr/XF86dri.c        |   10 +++---
 hw/kdrive/ephyr/ephyrhostvideo.c |    6 ++--
 hw/xfree86/int10/helper_mem.c    |    5 ---
 test/.gitignore                  |   13 ++++++++
 14 files changed, 37 insertions(+), 139 deletions(-)

New commits:
commit cd0ef0b6a2f9c6bfeda98684569da922792d3feb
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 14:30:22 2010 -0700

    dmx: Delete unused ChangeKeyboardDevice/ChangePointerDevice.
    
    Daniel Stone deleted the API for these in 2006, in commit
    96e32805d12fc36f0fa0926dbfb0dd8a5cadb739.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxxinput.c b/hw/dmx/input/dmxxinput.c
index a2a4156..8b58eeb 100644
--- a/hw/dmx/input/dmxxinput.c
+++ b/hw/dmx/input/dmxxinput.c
@@ -51,63 +51,6 @@
 #include "dmxinputinit.h"
 #include "exevents.h"
 
-/** Change the core keyboard from \a old_dev to \a new_dev.  Currently
- * this is not implemented. */
-int ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev)
-{
-#if 0
-    DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate;
-    DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate;
-    
-                                /* Switch our notion of core keyboard */
-    dmxLocalOld->isCore         = 0;
-    dmxLocalOld->sendsCore      = dmxLocalOld->savedSendsCore;
-
-    dmxLocalNew->isCore         = 1;
-    dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore;
-    dmxLocalNew->sendsCore      = 1;
-    dmxLocalCorePointer         = dmxLocalNew;
-
-    RegisterKeyboardDevice(new_dev);
-    RegisterOtherDevice(old_dev);
-    
-    return Success;
-#endif
-    return BadMatch;
-}
-
-/** Change the core pointer from \a old_dev to \a new_dev. */
-int ChangePointerDevice(DeviceIntPtr old_dev,
-                        DeviceIntPtr new_dev,
-                        unsigned char x,
-                        unsigned char y)
-{
-    DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate;
-    DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate;
-    
-    if (x != 0 || y != 1) return BadMatch;
-
-                                /* Make sure the new device can focus */
-    InitFocusClassDeviceStruct(old_dev);
-
-                                /* Switch the motion history buffers */
-    if (dmxLocalOld->savedMotionProc) {
-        old_dev->valuator->numMotionEvents = dmxLocalOld->savedMotionEvents;
-    }
-    dmxLocalNew->savedMotionEvents     = new_dev->valuator->numMotionEvents;
-    new_dev->valuator->numMotionEvents = GetMaximumEventsNum();
-                                /* Switch our notion of core pointer */
-    dmxLocalOld->isCore         = 0;
-    dmxLocalOld->sendsCore      = dmxLocalOld->savedSendsCore;
-
-    dmxLocalNew->isCore         = 1;
-    dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore;
-    dmxLocalNew->sendsCore      = 1;
-    dmxLocalCorePointer         = dmxLocalNew;
-    
-    return Success;
-}
-
 /** Close the input device.  This is not required by the XINPUT model
  * that DMX uses. */
 void CloseInputDevice (DeviceIntPtr d, ClientPtr client)
commit 70454864917f534483fa049e067b5646df61c88a
Author: Jamey Sharp <jamey at minilop.net>
Date:   Fri May 14 12:31:44 2010 -0700

    Ignore build products in the server's test suite.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Cc: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/test/.gitignore b/test/.gitignore
index ed97e81..db8c5f3 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,2 +1,15 @@
 #		Add & Override for this directory and it's subdirectories
 libxservertest.c
+
+input
+xkb
+xtest
+xi2/protocol-eventconvert
+xi2/protocol-xigetclientpointer
+xi2/protocol-xigetselectedevents
+xi2/protocol-xiquerydevice
+xi2/protocol-xiquerypointer
+xi2/protocol-xiqueryversion
+xi2/protocol-xiselectevents
+xi2/protocol-xisetclientpointer
+xi2/protocol-xiwarppointer
commit 8bb88379d95356384e233225bfda6abfd71389b4
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 15:52:18 2010 -0700

    dmx: Remove dead __glXDispSwap_DrawArraysEXT definition.
    
    Eric Anholt made the corresponding fix in glx/render2swap.c in commit
    49d38ab2328c409b2a98465b52677af057121513.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>

diff --git a/hw/dmx/glxProxy/render2swap.c b/hw/dmx/glxProxy/render2swap.c
index 37e43d8..0daeed1 100644
--- a/hw/dmx/glxProxy/render2swap.c
+++ b/hw/dmx/glxProxy/render2swap.c
@@ -333,9 +333,3 @@ void __glXDispSwap_DrawArrays(GLbyte *pc)
     }
 
 }
-
-void __glXDispSwap_DrawArraysEXT(GLbyte *pc)
-{
-#ifdef XXX_STUB
-#endif /*XXX_STUB*/
-}
commit c97a3ade5a8718b063292c73a31aac2196fe2452
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 15:17:30 2010 -0700

    dmx: Delete unused local variables.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/glxProxy/g_renderswap.c b/hw/dmx/glxProxy/g_renderswap.c
index b92821d..b6bede3 100644
--- a/hw/dmx/glxProxy/g_renderswap.c
+++ b/hw/dmx/glxProxy/g_renderswap.c
@@ -101,7 +101,6 @@ void __glXDispSwap_Color3sv(GLbyte *pc)
 
 void __glXDispSwap_Color3ubv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
 }
 
 void __glXDispSwap_Color3uiv(GLbyte *pc)
@@ -120,7 +119,6 @@ void __glXDispSwap_Color3usv(GLbyte *pc)
 
 void __glXDispSwap_Color4bv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
 }
 
 void __glXDispSwap_Color4dv(GLbyte *pc)
@@ -163,7 +161,6 @@ void __glXDispSwap_Color4sv(GLbyte *pc)
 
 void __glXDispSwap_Color4ubv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
 
 }
 
@@ -185,16 +182,10 @@ void __glXDispSwap_Color4usv(GLbyte *pc)
 
 void __glXDispSwap_EdgeFlagv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_End(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_Indexdv(GLbyte *pc)
@@ -238,9 +229,6 @@ void __glXDispSwap_Indexsv(GLbyte *pc)
 
 void __glXDispSwap_Normal3bv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_Normal3dv(GLbyte *pc)
@@ -1203,9 +1191,6 @@ void __glXDispSwap_TexGeniv(GLbyte *pc)
 
 void __glXDispSwap_InitNames(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_LoadName(GLbyte *pc)
@@ -1226,9 +1211,6 @@ void __glXDispSwap_PassThrough(GLbyte *pc)
 
 void __glXDispSwap_PopName(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_PushName(GLbyte *pc)
@@ -1318,16 +1300,10 @@ void __glXDispSwap_StencilMask(GLbyte *pc)
 
 void __glXDispSwap_ColorMask(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_DepthMask(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_IndexMask(GLbyte *pc)
@@ -1365,9 +1341,6 @@ void __glXDispSwap_Enable(GLbyte *pc)
 
 void __glXDispSwap_PopAttrib(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_PushAttrib(GLbyte *pc)
@@ -1698,9 +1671,6 @@ void __glXDispSwap_Frustum(GLbyte *pc)
 
 void __glXDispSwap_LoadIdentity(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_LoadMatrixf(GLbyte *pc)
@@ -1779,16 +1749,10 @@ void __glXDispSwap_Ortho(GLbyte *pc)
 
 void __glXDispSwap_PopMatrix(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_PushMatrix(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_Rotated(GLbyte *pc)
@@ -1974,9 +1938,6 @@ void __glXDispSwap_PrioritizeTextures(GLbyte *pc)
 
 void __glXDispSwap_Indexubv(GLbyte *pc)
 {
-	__GLX_DECLARE_SWAP_VARIABLES;
-
-
 }
 
 void __glXDispSwap_BlendColor(GLbyte *pc)
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 18df675..389aa3d 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3420,11 +3420,6 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
    Display *dpy;
    int screen, rc;
    DMXScreenInfo *dmxScreen;
-   char *attrbuf;
-#ifdef PANORAMIX
-    PanoramiXRes *pXinDraw = NULL;
-    PanoramiXRes *pXinReadDraw = NULL;
-#endif
 
    if (drawId != None) {
       rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
@@ -3491,7 +3486,7 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 
 #ifdef PANORAMIX
        if (!noPanoramiXExtension) {
-	  pXinDraw = (PanoramiXRes *)
+	  PanoramiXRes *pXinDraw = (PanoramiXRes *)
 	     SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
 	  if (!pXinDraw) {
 	     client->errorValue = drawId;
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index dbd4a92..0298435 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -254,7 +254,6 @@ void __glXScreenInit(GLint numscreens)
 	 if (numscreens > 1) {
 	    for (s=1; s<numscreens; s++) {
 	       DMXScreenInfo *dmxScreen = &dmxScreens[s];
-	       __GLXscreenInfo *glxScreen = &__glXActiveScreens[s];
 	  
 	       cfg = FindMatchingFBConfig( &dmxScreen0->fbconfigs[c],
 		                           dmxScreen->fbconfigs, 
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index a41257e..a076134 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -750,7 +750,6 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
     GLboolean swapBytes, lsbFirst;
     ClientPtr client = cl->client;
     DrawablePtr pDraw;
-    int error;
     __GLXcontext *glxc;
     int from_screen = 0;
     int to_screen = 0;
diff --git a/hw/dmx/glxProxy/renderpixswap.c b/hw/dmx/glxProxy/renderpixswap.c
index 462feee..9deb30d 100644
--- a/hw/dmx/glxProxy/renderpixswap.c
+++ b/hw/dmx/glxProxy/renderpixswap.c
@@ -358,7 +358,7 @@ void __glXDispSwap_SeparableFilter2D(GLbyte *pc)
 {
     __GLXdispatchConvolutionFilterHeader *hdr =
 				(__GLXdispatchConvolutionFilterHeader *) pc;
-    GLint hdrlen, image1len;
+    GLint hdrlen;
     __GLX_DECLARE_SWAP_VARIABLES;
 
     hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE);
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 9da4aba..5943e92 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -839,7 +839,6 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
     Display              *display;
     int                  num;
     int                  i, j;
-    DMXLocalInputInfoPtr dmxLocal;
     int                  (*handler)(Display *, char *, char *);
 
     if (!(display = XOpenDisplay(dmxInput->name))) return;
commit 3c3d099fc10c63d746f90c08043d45180d6a7226
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 13:44:32 2010 -0700

    dmx: Xfree -> free
    
    Mikhail fixed the corresponding Xallocs, but missed these uses of Xfree
    in commit 3f3ff971ecff9936cebafc813af9193b97bba89c.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index d9b884a..18df675 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3404,7 +3404,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
       WriteToClient(client, attribs_size, (char *)attribs);
    }
 
-   Xfree(attribs);
+   free(attribs);
 
    return Success;
 }
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index 7be7ac4..dbd4a92 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -204,9 +204,9 @@ static void CalcServerVersionAndExtensions( void )
     * release temporary storage
     */
    for (s=0; s<__glXNumActiveScreens; s++) {
-      if (be_extensions[s]) Xfree(be_extensions[s]); 
+      free(be_extensions[s]);
    }
-   Xfree( be_extensions );
+   free( be_extensions );
 
    if (dmxGLXSwapGroupSupport) {
        if (!denied_extensions ||
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index 8c7fdfc..a41257e 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -288,7 +288,7 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
 	  WriteToClient(client, be_buf_size, (char *)be_buf);
     }
 
-    if (be_buf_size > 0) Xfree(be_buf);
+    if (be_buf_size > 0) free(be_buf);
 
     return Success;
 }
@@ -364,7 +364,7 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
        SyncHandle();
 
        if (s > from_screen && be_buf_size > 0) {
-	  Xfree(be_buf);
+	  free(be_buf);
        }
     }
 
@@ -388,7 +388,7 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
 	  WriteToClient(client, be_buf_size, (char *)be_buf);
     }
 
-    if (be_buf_size > 0) Xfree(be_buf);
+    if (be_buf_size > 0) free(be_buf);
 
     return Success;
 }
@@ -939,12 +939,12 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
 
 		   }
 
-		   Xfree( be_buf );
+		   free( be_buf );
 		}
 		else {
 		   /* Throw data on the floor */
 		   _XEatData(dpy, be_buf_size);
-		   Xfree( buf );
+		   free( buf );
 		   return BadAlloc;
 		}
 	     }
@@ -970,7 +970,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
     WriteToClient(client, sizeof(xGLXReadPixelsReply),(char *)&reply);
     if (buf_size > 0) {
        WriteToClient(client, buf_size, (char *)buf);
-       Xfree( buf );
+       free( buf );
     }
 
     return Success;
diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c
index 6af53e2..cf864c2 100644
--- a/hw/dmx/glxProxy/glxvendor.c
+++ b/hw/dmx/glxProxy/glxvendor.c
@@ -272,7 +272,7 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
 	  WriteToClient(client, be_buf_size, (char *)be_buf);
     }
 
-    if (be_buf_size > 0) Xfree(be_buf);
+    if (be_buf_size > 0) free(be_buf);
 
     return Success;
 }
@@ -349,7 +349,7 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
        SyncHandle();
 
        if (s > from_screen && be_buf_size > 0) {
-	  Xfree(be_buf);
+	  free(be_buf);
        }
     }
 
@@ -369,7 +369,7 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
 	  WriteToClient(client, be_buf_size, (char *)be_buf);
     }
 
-    if (be_buf_size > 0) Xfree(be_buf);
+    if (be_buf_size > 0) free(be_buf);
 
     return Success;
 }
commit 01ca6400d949a873c0bb5de7e0dbf138e8a7949b
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 14:02:34 2010 -0700

    Xephyr: Fix Xcalloc deprecation warnings.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c
index 08123d3..e7c88b3 100644
--- a/hw/kdrive/ephyr/XF86dri.c
+++ b/hw/kdrive/ephyr/XF86dri.c
@@ -221,7 +221,7 @@ XF86DRIOpenConnection (Display *dpy, int screen,
     }
 
     if (rep.length) {
-        if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) {
+        if (!(*busIdString = (char *)calloc(rep.busIdStringLength + 1, 1))) {
             _XEatData(dpy, ((rep.busIdStringLength+3) & ~3));
             UnlockDisplay(dpy);
             SyncHandle();
@@ -316,7 +316,7 @@ Bool XF86DRIGetClientDriverName(Display *dpy, int screen,
     *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
 
     if (rep.length) {
-        if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) {
+        if (!(*clientDriverName = (char *)calloc(rep.clientDriverNameLength + 1, 1))) {
             _XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3));
             UnlockDisplay(dpy);
             SyncHandle();
@@ -528,7 +528,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
     if (*numClipRects) {
        int len = sizeof(drm_clip_rect_t) * (*numClipRects);
 
-       *pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
+       *pClipRects = (drm_clip_rect_t *)calloc(len, 1);
        if (*pClipRects)
 	  _XRead(dpy, (char*)*pClipRects, len);
     } else {
@@ -538,7 +538,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
     if (*numBackClipRects) {
        int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
 
-       *pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
+       *pBackClipRects = (drm_clip_rect_t *)calloc(len, 1);
        if (*pBackClipRects) 
 	  _XRead(dpy, (char*)*pBackClipRects, len);
     } else {
@@ -587,7 +587,7 @@ XF86DRIGetDeviceInfo (Display *dpy, int screen, drm_handle_t *hFrameBuffer,
     *devPrivateSize = rep.devPrivateSize;
 
     if (rep.length) {
-        if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) {
+        if (!(*pDevPrivate = (void *)calloc(rep.devPrivateSize, 1))) {
             _XEatData(dpy, ((rep.devPrivateSize+3) & ~3));
             UnlockDisplay(dpy);
             SyncHandle();
diff --git a/hw/kdrive/ephyr/ephyrhostvideo.c b/hw/kdrive/ephyr/ephyrhostvideo.c
index 53cd12e..38927b0 100644
--- a/hw/kdrive/ephyr/ephyrhostvideo.c
+++ b/hw/kdrive/ephyr/ephyrhostvideo.c
@@ -262,7 +262,7 @@ ephyrHostXVQueryAdaptors (EphyrHostXVAdaptorArray **a_adaptors)
 
     EPHYR_LOG ("enter\n") ;
 
-    result = Xcalloc (1, sizeof (EphyrHostXVAdaptorArray)) ;
+    result = calloc (1, sizeof (EphyrHostXVAdaptorArray)) ;
     if (!result)
         goto out ;
 
@@ -340,7 +340,7 @@ ephyrHostXVAdaptorGetVideoFormats (const EphyrHostXVAdaptor *a_this,
     EPHYR_RETURN_VAL_IF_FAIL (a_this, NULL) ;
 
     nb_formats = ((XvAdaptorInfo*)a_this)->num_formats ;
-    formats = Xcalloc (nb_formats, sizeof (EphyrHostVideoFormat)) ;
+    formats = calloc (nb_formats, sizeof (EphyrHostVideoFormat)) ;
     for (i=0; i < nb_formats; i++) {
         memset (&visual_info_template, 0, sizeof (visual_info_template)) ;
         visual_info_template.visualid =
@@ -454,7 +454,7 @@ ephyrHostXVQueryEncodings (int a_port_id,
                             &num_encodings,
                             &encoding_info) ;
     if (num_encodings && encoding_info) {
-        encodings = Xcalloc (num_encodings, sizeof (EphyrHostEncoding)) ;
+        encodings = calloc (num_encodings, sizeof (EphyrHostEncoding)) ;
         for (i=0; i<num_encodings; i++) {
             encodings[i].id = encoding_info[i].encoding_id ;
             encodings[i].name = strdup (encoding_info[i].name) ;
commit 34df659687ad3936ab03d19ce8fdb21f385c2e8a
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 11:51:32 2010 -0700

    xfree86/int10/helper_mem: Fix log message.
    
    Three years ago in commit f62beb6f3609e8b6e61325ac89017590811bbd07 ajax
    deleted the code that could have set this format string to anything
    else, so just use the format string literal. This makes GCC happy since
    it can check the argument types, which, by the way, weren't correct
    since this format string doesn't need any arguments.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
    Reviewed-by: Tiago Vignatti <tiago.vignatti at nokia.com>

diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 3f206c2..496c9a5 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -296,15 +296,12 @@ xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base)
     unsigned i;
     int cs = ~0;
     int segments[4];
-    const char * format;
 
     segments[0] = MEM_RW(pInt, (0x10 << 2) + 2);
     segments[1] = MEM_RW(pInt, (0x42 << 2) + 2);
     segments[2] = V_BIOS >> 4;
     segments[3] = ~0;
 
-    format = "No V_BIOS found\n";
-
     for (i = 0; segments[i] != ~0; i++) {
 	unsigned char * vbiosMem;
 
@@ -318,7 +315,7 @@ xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base)
     }
 
     if (segments[i] == ~0) {
-	xf86DrvMsg(pInt->scrnIndex, X_ERROR, format, (unsigned long)cs << 4);
+	xf86DrvMsg(pInt->scrnIndex, X_ERROR, "No V_BIOS found\n");
 	return FALSE;
     }
 
commit 0a98d9e6cec7c611a3c56f97d4ddc0c546975c55
Author: Jamey Sharp <jamey at minilop.net>
Date:   Tue May 25 10:30:58 2010 -0700

    xf86bigfont: Silence compiler warning by initializing pDesc.
    
    Access to pDesc was always guarded by (nCharInfos > 0), so the code
    wasn't actually buggy, but this makes it clear that it's correct.
    
    Signed-off-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 8c4a7eb..8b3913d 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -404,7 +404,7 @@ ProcXF86BigfontQueryFont(
     int nCharInfos;
     int shmid;
 #ifdef HAS_SHM
-    ShmDescPtr pDesc;
+    ShmDescPtr pDesc = NULL;
 #else
 #define pDesc 0
 #endif
@@ -449,8 +449,6 @@ ProcXF86BigfontQueryFont(
 #ifdef HAS_SHM
 	if (!badSysCall)
 	    pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
-	else
-	    pDesc = NULL;
 	if (pDesc) {
 	    pCI = (xCharInfo *) pDesc->attach_addr;
 	    if (stuff_flags & XF86Bigfont_FLAGS_Shm)


More information about the xorg-commit mailing list