[Xquartz-changes] xserver: Branch 'master' - 4 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Mar 23 10:36:17 PDT 2010


Rebased ref, commits from common ancestor:
commit e081ef1d26c03a38da58f1eacf21ebe8fff5a7d9
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Mar 22 14:20:56 2010 -0700

    XKB: Fix garbage initialization
    
    XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify
    changedControls mask because it was uninitialized on the stack.
    
    Found by clang
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 5b317c9..e287997 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -753,7 +753,7 @@ XkbSrvLedInfoPtr	sli;
     if (cause!=NULL) {
 	xkbControlsNotify cn;
 	cn.numGroups= ctrls->num_groups;
-	cn.changedControls|= XkbControlsEnabledMask;
+	cn.changedControls= XkbControlsEnabledMask;
 	cn.enabledControls= ctrls->enabled_ctrls;
 	cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
 	cn.keycode= cause->kc;
commit 5303287b0e5d82caaaa2d48296a4031b019c51c0
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Mar 22 09:33:09 2010 -0700

    GLX: Fix initialization of some glXDispSwap requests
    
    __glXDispSwap_DestroyPbuffer
    __glXDispSwap_DestroyGLXPbufferSGIX
    __glXDispSwap_ChangeDrawableAttributes
    __glXDispSwap_ChangeDrawableAttributesSGIX
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Ian Romanick <idr at freedesktop.org>

diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
index f1c0ce6..c414dc8 100644
--- a/glx/glxcmdsswap.c
+++ b/glx/glxcmdsswap.c
@@ -354,7 +354,7 @@ int __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
 
 int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
 {
-    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req;
+    xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
     __GLX_DECLARE_SWAP_VARIABLES;
 
     __GLX_SWAP_INT(&req->pbuffer);
@@ -364,7 +364,7 @@ int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
 
 int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
 {
-    xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) req;
+    xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc;
     __GLX_DECLARE_SWAP_VARIABLES;
 
     __GLX_SWAP_INT(&req->pbuffer);
@@ -375,7 +375,7 @@ int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
 int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 {
     xGLXChangeDrawableAttributesReq *req =
-	(xGLXChangeDrawableAttributesReq *) req;
+	(xGLXChangeDrawableAttributesReq *) pc;
     __GLX_DECLARE_SWAP_VARIABLES;
     __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
     CARD32 *attribs;
@@ -392,7 +392,7 @@ int __glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState *cl,
 					       GLbyte *pc)
 {
     xGLXChangeDrawableAttributesSGIXReq *req =
-	(xGLXChangeDrawableAttributesSGIXReq *) req;
+	(xGLXChangeDrawableAttributesSGIXReq *) pc;
     __GLX_DECLARE_SWAP_VARIABLES;
     __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
     CARD32 *attribs;
commit 1c307d64d74ae8719680afcb750840851d33161f
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Mar 22 09:30:51 2010 -0700

    GLX: Remove a redundant initialization
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/glx/indirect_dispatch.c b/glx/indirect_dispatch.c
index 6665519..ecd2bc8 100644
--- a/glx/indirect_dispatch.c
+++ b/glx/indirect_dispatch.c
@@ -98,8 +98,6 @@ void __glXDisp_CallLists(GLbyte * pc)
     const GLenum type = *(GLenum   *)(pc +  4);
     const GLvoid * lists =  (const GLvoid *)(pc +  8);
 
-    lists = (const GLvoid *) (pc + 8);
-
     CALL_CallLists( GET_DISPATCH(), (
         n,
         type,
commit 3083c5d0c4386cdd7083b7a83ac72fdad2f1e61e
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Mon Mar 22 18:01:17 2010 +0100

    Xext: Fix cursor reference counting hazard.
    
    Make sure the reference count of the new cursor is increased before the old
    one is decreased, otherwise bad things will happen if they're one and the
    same and the reference count is 1 initially. Not sure this can actually happen
    here, but better safe than sorry.
    
    Signed-off-by: Michel Dänzer <daenzer at vmware.com>
    Reviewed-by: Roland Scheidegger <sroland at vmware.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/Xext/saver.c b/Xext/saver.c
index 2549e8a..aa2e614 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -620,10 +620,10 @@ CreateSaverWindow (ScreenPtr pScreen)
     	    	FreeResource (pWin->drawable.id, RT_NONE);
     	    	return FALSE;
 	    }
+	pAttr->pCursor->refcnt++;
 	if (pWin->optional->cursor)
 	    FreeCursor (pWin->optional->cursor, (Cursor)0);
 	pWin->optional->cursor = pAttr->pCursor;
-	pAttr->pCursor->refcnt++;
 	pWin->cursorIsNone = FALSE;
 	CheckWindowOptionalNeed (pWin);
 	mask |= CWCursor;


More information about the Xquartz-changes mailing list