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>
This commit is contained in:
parent
93a7399370
commit
a391089186
|
@ -3466,20 +3466,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
|
||||||
if (drawId != None) {
|
if (drawId != None) {
|
||||||
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
|
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
|
||||||
if (rc == Success) {
|
if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
|
||||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
be_drawable = 0;
|
||||||
WindowPtr pWin = (WindowPtr)pDraw;
|
screen = pDraw->pScreen->myNum;
|
||||||
be_drawable = 0;
|
} else {
|
||||||
screen = pWin->drawable.pScreen->myNum;
|
/*
|
||||||
|
** Drawable is not a Window , GLXWindow or a GLXPixmap.
|
||||||
}
|
*/
|
||||||
else {
|
client->errorValue = drawId;
|
||||||
/*
|
return __glXBadDrawable;
|
||||||
** Drawable is not a Window , GLXWindow or a GLXPixmap.
|
|
||||||
*/
|
|
||||||
client->errorValue = drawId;
|
|
||||||
return __glXBadDrawable;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pDraw) {
|
if (!pDraw) {
|
||||||
|
@ -3517,17 +3512,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
|
||||||
be_drawable = pGlxPbuffer->be_xids[screen];
|
be_drawable = pGlxPbuffer->be_xids[screen];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pDraw) {
|
||||||
if (!pDraw) {
|
|
||||||
/*
|
/*
|
||||||
** 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 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
|
||||||
|
|
Loading…
Reference in New Issue