From 47e1d0ea43eb7a6caf774f375f11849d0d515e14 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2012 14:56:02 +1000 Subject: test: fix "userdata shadows global declaration" warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit protocol-xiquerypointer.c:124:72: warning: declaration of ‘userdata’ shadows a global declaration [-Wshadow] and similar Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- test/xi2/protocol-xipassivegrabdevice.c | 6 +++--- test/xi2/protocol-xiquerydevice.c | 8 ++++---- test/xi2/protocol-xiquerypointer.c | 6 +++--- test/xi2/protocol-xiqueryversion.c | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'test/xi2') diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c index 53c65bda6..1d8c46b29 100644 --- a/test/xi2/protocol-xipassivegrabdevice.c +++ b/test/xi2/protocol-xipassivegrabdevice.c @@ -54,7 +54,7 @@ int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask); static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, - char *data, void *userdata); + char *data, void *closure); int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) @@ -85,7 +85,7 @@ __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, } static void -reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *userdata) +reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *closure) { xXIPassiveGrabDeviceReply *rep = (xXIPassiveGrabDeviceReply *) data; @@ -107,7 +107,7 @@ reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *userdata) static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, - void *userdata) + void *closure) { int i; diff --git a/test/xi2/protocol-xiquerydevice.c b/test/xi2/protocol-xiquerydevice.c index 5e59e8084..e588f8dc2 100644 --- a/test/xi2/protocol-xiquerydevice.c +++ b/test/xi2/protocol-xiquerydevice.c @@ -54,9 +54,9 @@ struct test_data { }; static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, - void *userdata); + void *closure); static void reply_XIQueryDevice(ClientPtr client, int len, char *data, - void *userdata); + void *closure); /* reply handling for the first bytes that constitute the reply */ static void @@ -86,10 +86,10 @@ reply_XIQueryDevice(ClientPtr client, int len, char *data, void *userdata) /* reply handling for the trailing bytes that constitute the device info */ static void -reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *userdata) +reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure) { int i, j; - struct test_data *querydata = (struct test_data *) userdata; + struct test_data *querydata = (struct test_data *) closure; DeviceIntPtr dev; xXIDeviceInfo *info = (xXIDeviceInfo *) data; diff --git a/test/xi2/protocol-xiquerypointer.c b/test/xi2/protocol-xiquerypointer.c index 4756a6b2e..ff7ff5c02 100644 --- a/test/xi2/protocol-xiquerypointer.c +++ b/test/xi2/protocol-xiquerypointer.c @@ -42,7 +42,7 @@ static ClientRec client_request; static void reply_XIQueryPointer_data(ClientPtr client, int len, - char *data, void *userdata); + char *data, void *closure); static struct { DeviceIntPtr dev; @@ -70,7 +70,7 @@ __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) } static void -reply_XIQueryPointer(ClientPtr client, int len, char *data, void *userdata) +reply_XIQueryPointer(ClientPtr client, int len, char *data, void *closure) { xXIQueryPointerReply *rep = (xXIQueryPointerReply *) data; SpritePtr sprite; @@ -121,7 +121,7 @@ reply_XIQueryPointer(ClientPtr client, int len, char *data, void *userdata) } static void -reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *userdata) +reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *closure) { reply_handler = reply_XIQueryPointer; } diff --git a/test/xi2/protocol-xiqueryversion.c b/test/xi2/protocol-xiqueryversion.c index 1347e866c..aff023754 100644 --- a/test/xi2/protocol-xiqueryversion.c +++ b/test/xi2/protocol-xiqueryversion.c @@ -59,10 +59,10 @@ struct test_data { }; static void -reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata) +reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure) { xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data; - struct test_data *versions = (struct test_data *) userdata; + struct test_data *versions = (struct test_data *) closure; unsigned int sver, cver, ver; if (client->swapped) { @@ -85,10 +85,10 @@ reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata) } static void -reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *userdata) +reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *closure) { xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data; - struct test_data *versions = (struct test_data *) userdata; + struct test_data *versions = (struct test_data *) closure; reply_check_defaults(rep, len, XIQueryVersion); assert(rep->length == 0); -- cgit v1.2.3