glxproxy: warning fix

glxcmds.c: In function ‘__glXGetDrawableAttributes’:
glxcmds.c:3295:8: warning: ‘screen’ may be used uninitialized in this function
glxcmds.c:3298:8: warning: ‘attribs_size’ may be used uninitialized in this function

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2011-02-08 14:02:37 -05:00
parent a391089186
commit 767b93e783

View File

@ -3295,28 +3295,24 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
int screen, rc; int screen, rc;
DMXScreenInfo *dmxScreen; DMXScreenInfo *dmxScreen;
CARD32 *attribs = NULL; CARD32 *attribs = NULL;
int attribs_size; int attribs_size = 0;
#ifdef PANORAMIX #ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL; PanoramiXRes *pXinDraw = NULL;
#endif #endif
if (drawId != None) { if (drawId != None) {
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
if (rc == Success) { if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
if (pDraw->type == DRAWABLE_WINDOW) {
WindowPtr pWin = (WindowPtr)pDraw; WindowPtr pWin = (WindowPtr)pDraw;
be_drawable = 0; be_drawable = 0;
screen = pWin->drawable.pScreen->myNum; screen = pWin->drawable.pScreen->myNum;
} else {
}
else {
/* /*
** Drawable is not a Window , GLXWindow or a GLXPixmap. ** Drawable is not a Window , GLXWindow or a GLXPixmap.
*/ */
client->errorValue = drawId; client->errorValue = drawId;
return __glXBadDrawable; return __glXBadDrawable;
} }
}
if (!pDraw) { if (!pDraw) {
__GLXpixmap *pGlxPixmap; __GLXpixmap *pGlxPixmap;
@ -3353,7 +3349,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
be_drawable = pGlxPbuffer->be_xids[screen]; be_drawable = pGlxPbuffer->be_xids[screen];
} }
} }
}
if (!pDraw) { if (!pDraw) {
/* /*
@ -3362,8 +3358,6 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
client->errorValue = drawId; client->errorValue = drawId;
return __glXBadDrawable; return __glXBadDrawable;
} }
}
/* if the drawable is a window or GLXWindow - /* if the drawable is a window or GLXWindow -
* we need to find the base id on the back-end server * we need to find the base id on the back-end server