summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-02-08 13:55:23 -0500
committerAdam Jackson <ajax@redhat.com>2011-02-23 13:39:03 -0500
commita391089186cd1063d807bf14a9651e6861b248de (patch)
treefdadcea202dc0bbc78f4d4670d00eec21fc96715
parent93a73993708b1345c86ec3ec06b02ed236595673 (diff)
glxproxy: warning fix
glxcmds.c: In function ‘__glXChangeDrawableAttributes’: glxcmds.c:3464:8: warning: ‘screen’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/dmx/glxProxy/glxcmds.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index a58eb3554..cbefdfac4 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3466,20 +3466,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
if (drawId != None) {
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
- if (rc == Success) {
- if (pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDraw;
- be_drawable = 0;
- screen = pWin->drawable.pScreen->myNum;
-
- }
- else {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
+ if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+ be_drawable = 0;
+ screen = pDraw->pScreen->myNum;
+ } else {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
}
if (!pDraw) {
@@ -3517,17 +3512,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
be_drawable = pGlxPbuffer->be_xids[screen];
}
}
+ }
-
- if (!pDraw) {
+ if (!pDraw) {
/*
** Drawable is not a Window , GLXWindow or a GLXPixmap.
*/
client->errorValue = drawId;
return __glXBadDrawable;
- }
- }
-
+ }
/* if the drawable is a window or GLXWindow -
* we need to find the base id on the back-end server