dix: fix shadow warnings
dispatch.c: In function 'ProcCopyArea': dispatch.c:1608:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1604:9: warning: shadowed declaration is here dispatch.c: In function 'ProcCopyPlane': dispatch.c:1647:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1643:9: warning: shadowed declaration is here events.c: In function 'GetClientsForDelivery': events.c:2030:68: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'DeliverEventToWindowMask': events.c:2113:19: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'EventSuppressForWindow': events.c:4420:12: warning: declaration of 'free' shadows a global declaration Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
1aa783754e
commit
e8d45f3018
24
dix/events.c
24
dix/events.c
|
@ -2027,19 +2027,19 @@ DeliverToWindowOwner(DeviceIntPtr dev, WindowPtr win,
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
|
GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
|
||||||
xEvent *events, Mask filter, InputClients ** clients)
|
xEvent *events, Mask filter, InputClients ** iclients)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (core_get_type(events) != 0)
|
if (core_get_type(events) != 0)
|
||||||
*clients = (InputClients *) wOtherClients(win);
|
*iclients = (InputClients *) wOtherClients(win);
|
||||||
else if (xi2_get_type(events) != 0) {
|
else if (xi2_get_type(events) != 0) {
|
||||||
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
||||||
|
|
||||||
/* Has any client selected for the event? */
|
/* Has any client selected for the event? */
|
||||||
if (!WindowXI2MaskIsset(dev, win, events))
|
if (!WindowXI2MaskIsset(dev, win, events))
|
||||||
goto out;
|
goto out;
|
||||||
*clients = inputMasks->inputClients;
|
*iclients = inputMasks->inputClients;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
OtherInputMasks *inputMasks = wOtherInputMasks(win);
|
||||||
|
@ -2048,7 +2048,7 @@ GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
|
||||||
if (!inputMasks || !(inputMasks->inputEvents[dev->id] & filter))
|
if (!inputMasks || !(inputMasks->inputEvents[dev->id] & filter))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
*clients = inputMasks->inputClients;
|
*iclients = inputMasks->inputClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = 1;
|
rc = 1;
|
||||||
|
@ -2110,12 +2110,12 @@ DeliverEventToWindowMask(DeviceIntPtr dev, WindowPtr win, xEvent *events,
|
||||||
int count, Mask filter, GrabPtr grab,
|
int count, Mask filter, GrabPtr grab,
|
||||||
ClientPtr *client_return, Mask *mask_return)
|
ClientPtr *client_return, Mask *mask_return)
|
||||||
{
|
{
|
||||||
InputClients *clients;
|
InputClients *iclients;
|
||||||
|
|
||||||
if (!GetClientsForDelivery(dev, win, events, filter, &clients))
|
if (!GetClientsForDelivery(dev, win, events, filter, &iclients))
|
||||||
return EVENT_SKIP;
|
return EVENT_SKIP;
|
||||||
|
|
||||||
return DeliverEventToInputClients(dev, clients, win, events, count, filter,
|
return DeliverEventToInputClients(dev, iclients, win, events, count, filter,
|
||||||
grab, client_return, mask_return);
|
grab, client_return, mask_return);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4417,7 +4417,7 @@ int
|
||||||
EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
||||||
Mask mask, Bool *checkOptional)
|
Mask mask, Bool *checkOptional)
|
||||||
{
|
{
|
||||||
int i, free;
|
int i, freed;
|
||||||
|
|
||||||
if (mask & ~PropagateMask) {
|
if (mask & ~PropagateMask) {
|
||||||
client->errorValue = mask;
|
client->errorValue = mask;
|
||||||
|
@ -4428,14 +4428,14 @@ EventSuppressForWindow(WindowPtr pWin, ClientPtr client,
|
||||||
if (!mask)
|
if (!mask)
|
||||||
i = 0;
|
i = 0;
|
||||||
else {
|
else {
|
||||||
for (i = DNPMCOUNT, free = 0; --i > 0;) {
|
for (i = DNPMCOUNT, freed = 0; --i > 0;) {
|
||||||
if (!DontPropagateRefCnts[i])
|
if (!DontPropagateRefCnts[i])
|
||||||
free = i;
|
freed = i;
|
||||||
else if (mask == DontPropagateMasks[i])
|
else if (mask == DontPropagateMasks[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!i && free) {
|
if (!i && freed) {
|
||||||
i = free;
|
i = freed;
|
||||||
DontPropagateMasks[i] = mask;
|
DontPropagateMasks[i] = mask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,12 +88,12 @@ SOFTWARE.
|
||||||
|
|
||||||
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
|
#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
|
||||||
{\
|
{\
|
||||||
int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
|
||||||
if (rc != Success)\
|
if (tmprc != Success)\
|
||||||
return rc;\
|
return tmprc;\
|
||||||
rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
|
||||||
if (rc != Success)\
|
if (tmprc != Success)\
|
||||||
return rc;\
|
return tmprc;\
|
||||||
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
||||||
return BadMatch;\
|
return BadMatch;\
|
||||||
}\
|
}\
|
||||||
|
|
Loading…
Reference in New Issue