Module Name:    xsrc
Committed By:   tsutsui
Date:           Sun Nov 27 15:12:16 UTC 2011

Modified Files:
        xsrc/external/mit/xf86-input-mouse/dist/src: mouse.c pnp.c

Log Message:
Fix -Wshadow.  (should be committed before
src/external/mit/xorg/server/drivers/xf86-input-mouse/Makefile rev 1.5. Sorry)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
    xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
    xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
diff -u xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.13 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.14
--- xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.13	Sun Jul 24 00:42:42 2011
+++ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c	Sun Nov 27 15:12:16 2011
@@ -273,7 +273,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
     MessageType buttons_from = X_CONFIG;
     char *s;
     int origButtons;
-    int i;
+    int btn;
 
     pMse = pInfo->private;
 
@@ -583,8 +583,8 @@ MouseCommonOptions(InputInfoPtr pInfo)
        free(s);
     }
     /* get maximum of mapped buttons */
-    for (i = pMse->buttons-1; i >= 0; i--) {
-	int f = ffs (pMse->buttonMap[i]);
+    for (btn = pMse->buttons-1; btn >= 0; btn--) {
+	int f = ffs (pMse->buttonMap[btn]);
 	if (f > pMse->buttons)
 	    pMse->buttons = f;
     }
@@ -3487,21 +3487,21 @@ autoProbeMouse(InputInfoPtr pInfo, Bool 
 	}
 	case AUTOPROBE_SWITCH_PROTOCOL:
 	{
-	    MouseProtocolID proto;
+	    MouseProtocolID protoid;
 	    void *defaults;
 	    AP_DBG(("State SWITCH_PROTOCOL\n"));
-	    proto = mPriv->protoList[mPriv->protocolID++];
-	    if (proto == PROT_UNKNOWN) 
+	    protoid = mPriv->protoList[mPriv->protocolID++];
+	    if (protoid == PROT_UNKNOWN) 
 		mPriv->autoState = AUTOPROBE_SWITCHSERIAL;
-	    else if (!(defaults = GetProtocol(proto)->defaults)
+	    else if (!(defaults = GetProtocol(protoid)->defaults)
 		       || (mPriv->serialDefaultsNum == -1 
 			   && (defaults == msDefaults))
 		       || (mPriv->serialDefaultsNum != -1
 			   && serialDefaultsList[mPriv->serialDefaultsNum]
 			   == defaults)) {
 		AP_DBG(("Changing Protocol to %s\n",
-			ProtocolIDToName(proto)));
-		SetMouseProto(pMse,proto);
+			ProtocolIDToName(protoid)));
+		SetMouseProto(pMse,protoid);
 		FlushButtons(pMse);
 		RESET_VALIDATION;
 		mPriv->autoState = AUTOPROBE_VALIDATE2;

Index: xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c
diff -u xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c:1.1.1.4 xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c:1.2
--- xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c:1.1.1.4	Sun Jul 24 00:38:36 2011
+++ xsrc/external/mit/xf86-input-mouse/dist/src/pnp.c	Sun Nov 27 15:12:16 2011
@@ -708,8 +708,8 @@ probePs2ProtocolPnP(InputInfoPtr pInfo)
 	    u = ps2GetDeviceID(pInfo);
 	    if (u == 0x03) {
 		/* found IntelliMouse now try IntelliExplorer */
-		unsigned char seq[] = { 243, 200, 243, 200, 243, 80 };
-		if (ps2SendPacket(pInfo,seq,sizeof(seq))) {
+		unsigned char seqi[] = { 243, 200, 243, 200, 243, 80 };
+		if (ps2SendPacket(pInfo,seqi,sizeof(seqi))) {
 		    u = ps2GetDeviceID(pInfo);
 		    if (u == 0x04)
 			ret =  PROT_EXPPS2;

Reply via email to