From 43754803c13c232fd5c37eb3d4b1ca2898d6a6cd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 14 May 2012 15:07:57 +1000 Subject: [PATCH] test: don't shadow parameter 'len' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a parameter [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas --- test/xi2/protocol-xiquerydevice.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/xi2/protocol-xiquerydevice.c b/test/xi2/protocol-xiquerydevice.c index b45358ec1..9d13bbb6f 100644 --- a/test/xi2/protocol-xiquerydevice.c +++ b/test/xi2/protocol-xiquerydevice.c @@ -223,7 +223,7 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure) any->type == XIValuatorClass); if (any->type == XIButtonClass) { - int len; + int l; xXIButtonInfo *bi = (xXIButtonInfo *) any; if (client->swapped) @@ -231,10 +231,9 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure) assert(bi->num_buttons == devices.vcp->button->numButtons); - len = - 2 + bi->num_buttons + + l = 2 + bi->num_buttons + bytes_to_int32(bits_to_bytes(bi->num_buttons)); - assert(bi->length == len); + assert(bi->length == l); } else if (any->type == XIValuatorClass) { xXIValuatorInfo *vi = (xXIValuatorInfo *) any;