Xi: fix "shadows previous local" warnings
exevents.c: In function 'DeepCopyFeedbackClasses': exevents.c:272:20: warning: declaration of 'classes' shadows a previous local [-Wshadow] exevents.c:245:16: warning: shadowed declaration is here [-Wshadow] (and a few more like this) exevents.c: In function 'DeliverTouchEmulatedEvent': exevents.c:1442:27: warning: declaration of 'win' shadows a parameter [-Wshadow] exevents.c:1404:55: warning: shadowed declaration is here [-Wshadow] exevents.c:1475:28: warning: declaration of 'listener' shadows a parameter [-Wshadow] exevents.c:1403:62: warning: shadowed declaration is here [-Wshadow] xiselectev.c: In function 'ProcXISelectEvents': xiselectev.c:178:34: warning: declaration of 'dummy' shadows a previous local [-Wshadow] xiselectev.c:91:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
		
							parent
							
								
									ca6d25ad2d
								
							
						
					
					
						commit
						e42bf98283
					
				|  | @ -269,8 +269,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->intfeed && !from->intfeed) { |     else if (to->intfeed && !from->intfeed) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->intfeed = to->intfeed; |         classes->intfeed = to->intfeed; | ||||||
|         to->intfeed = NULL; |         to->intfeed = NULL; | ||||||
|  | @ -301,8 +299,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->stringfeed && !from->stringfeed) { |     else if (to->stringfeed && !from->stringfeed) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->stringfeed = to->stringfeed; |         classes->stringfeed = to->stringfeed; | ||||||
|         to->stringfeed = NULL; |         to->stringfeed = NULL; | ||||||
|  | @ -334,8 +330,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->bell && !from->bell) { |     else if (to->bell && !from->bell) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->bell = to->bell; |         classes->bell = to->bell; | ||||||
|         to->bell = NULL; |         to->bell = NULL; | ||||||
|  | @ -369,8 +363,6 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->leds && !from->leds) { |     else if (to->leds && !from->leds) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->leds = to->leds; |         classes->leds = to->leds; | ||||||
|         to->leds = NULL; |         to->leds = NULL; | ||||||
|  | @ -417,8 +409,6 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->kbdfeed && !from->kbdfeed) { |     else if (to->kbdfeed && !from->kbdfeed) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->kbdfeed = to->kbdfeed; |         classes->kbdfeed = to->kbdfeed; | ||||||
|         to->kbdfeed = NULL; |         to->kbdfeed = NULL; | ||||||
|  | @ -437,8 +427,6 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         CopyKeyClass(from, to); |         CopyKeyClass(from, to); | ||||||
|     } |     } | ||||||
|     else if (to->key && !from->key) { |     else if (to->key && !from->key) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->key = to->key; |         classes->key = to->key; | ||||||
|         to->key = NULL; |         to->key = NULL; | ||||||
|  | @ -494,8 +482,6 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->focus) { |     else if (to->focus) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->focus = to->focus; |         classes->focus = to->focus; | ||||||
|         to->focus = NULL; |         to->focus = NULL; | ||||||
|  | @ -536,8 +522,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (to->ptrfeed && !from->ptrfeed) { |     else if (to->ptrfeed && !from->ptrfeed) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->ptrfeed = to->ptrfeed; |         classes->ptrfeed = to->ptrfeed; | ||||||
|         to->ptrfeed = NULL; |         to->ptrfeed = NULL; | ||||||
|  | @ -564,8 +548,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         v->sourceid = from->id; |         v->sourceid = from->id; | ||||||
|     } |     } | ||||||
|     else if (to->valuator && !from->valuator) { |     else if (to->valuator && !from->valuator) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->valuator = to->valuator; |         classes->valuator = to->valuator; | ||||||
|         to->valuator = NULL; |         to->valuator = NULL; | ||||||
|  | @ -601,8 +583,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         to->button->sourceid = from->id; |         to->button->sourceid = from->id; | ||||||
|     } |     } | ||||||
|     else if (to->button && !from->button) { |     else if (to->button && !from->button) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->button = to->button; |         classes->button = to->button; | ||||||
|         to->button = NULL; |         to->button = NULL; | ||||||
|  | @ -624,8 +604,6 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) | ||||||
|         to->proximity->sourceid = from->id; |         to->proximity->sourceid = from->id; | ||||||
|     } |     } | ||||||
|     else if (to->proximity) { |     else if (to->proximity) { | ||||||
|         ClassesPtr classes; |  | ||||||
| 
 |  | ||||||
|         classes = to->unused_classes; |         classes = to->unused_classes; | ||||||
|         classes->proximity = to->proximity; |         classes->proximity = to->proximity; | ||||||
|         to->proximity = NULL; |         to->proximity = NULL; | ||||||
|  | @ -1461,9 +1439,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, | ||||||
| 
 | 
 | ||||||
|             if (grab->ownerEvents) { |             if (grab->ownerEvents) { | ||||||
|                 WindowPtr focus = NullWindow; |                 WindowPtr focus = NullWindow; | ||||||
|                 WindowPtr win = dev->spriteInfo->sprite->win; |                 WindowPtr sprite_win = dev->spriteInfo->sprite->win; | ||||||
| 
 | 
 | ||||||
|                 deliveries = DeliverDeviceEvents(win, ptrev, grab, focus, dev); |                 deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (!deliveries) |             if (!deliveries) | ||||||
|  | @ -1494,7 +1472,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, | ||||||
|          * the event. |          * the event. | ||||||
|          */ |          */ | ||||||
|         if (!devgrab && dev->deviceGrab.grab && dev->deviceGrab.implicitGrab) { |         if (!devgrab && dev->deviceGrab.grab && dev->deviceGrab.implicitGrab) { | ||||||
|             TouchListener *listener; |             TouchListener *l; | ||||||
| 
 | 
 | ||||||
|             devgrab = dev->deviceGrab.grab; |             devgrab = dev->deviceGrab.grab; | ||||||
| 
 | 
 | ||||||
|  | @ -1504,13 +1482,13 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, | ||||||
|              * selection. Implicit grab activation occurs through delivering an |              * selection. Implicit grab activation occurs through delivering an | ||||||
|              * event selection. Thus, we update the last listener in the array. |              * event selection. Thus, we update the last listener in the array. | ||||||
|              */ |              */ | ||||||
|             listener = &ti->listeners[ti->num_listeners - 1]; |             l = &ti->listeners[ti->num_listeners - 1]; | ||||||
|             listener->listener = devgrab->resource; |             l->listener = devgrab->resource; | ||||||
| 
 | 
 | ||||||
|             if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin) |             if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin) | ||||||
|                 listener->type = LISTENER_POINTER_GRAB; |                 l->type = LISTENER_POINTER_GRAB; | ||||||
|             else |             else | ||||||
|                 listener->type = LISTENER_GRAB; |                 l->type = LISTENER_GRAB; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -175,17 +175,17 @@ ProcXISelectEvents(ClientPtr client) | ||||||
|                 if (inputMasks) |                 if (inputMasks) | ||||||
|                     iclient = inputMasks->inputClients; |                     iclient = inputMasks->inputClients; | ||||||
|                 for (; iclient; iclient = iclient->next) { |                 for (; iclient; iclient = iclient->next) { | ||||||
|                     DeviceIntPtr dummy; |                     DeviceIntPtr tmp; | ||||||
| 
 | 
 | ||||||
|                     if (CLIENT_ID(iclient->resource) == client->index) |                     if (CLIENT_ID(iclient->resource) == client->index) | ||||||
|                         continue; |                         continue; | ||||||
| 
 | 
 | ||||||
|                     dixLookupDevice(&dummy, evmask->deviceid, serverClient, |                     dixLookupDevice(&tmp, evmask->deviceid, serverClient, | ||||||
|                                     DixReadAccess); |                                     DixReadAccess); | ||||||
|                     if (!dummy) |                     if (!tmp) | ||||||
|                         return BadImplementation;       /* this shouldn't happen */ |                         return BadImplementation;       /* this shouldn't happen */ | ||||||
| 
 | 
 | ||||||
|                     if (xi2mask_isset(iclient->xi2mask, dummy, XI_TouchBegin)) |                     if (xi2mask_isset(iclient->xi2mask, tmp, XI_TouchBegin)) | ||||||
|                         return BadAccess; |                         return BadAccess; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue