[PATCH 4/5] test: don't shadow parameter 'len'

Peter Hutterer peter.hutterer at who-t.net
Tue May 15 00:03:02 PDT 2012


protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a
parameter [-Wshadow]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 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 b45358e..9d13bbb 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;
-- 
1.7.10.1



More information about the xorg-devel mailing list