Index: /trunk/src/VBox/Additions/x11/vboxmouse/mouse.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/mouse.c	(revision 31414)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/mouse.c	(revision 31415)
@@ -45,6 +45,4 @@
 #include "XI.h"
 #include "XIproto.h"
-#include "extnsionst.h"
-#include "extinit.h"
 #else
 #include "inputstr.h"
Index: /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/mouse.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/mouse.c	(revision 31414)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/mouse.c	(revision 31415)
@@ -474,5 +474,5 @@
 	int target;           /* target button */
 	int lockM,targetM;    /* bitmasks for drag lock, target */
-	int i, j;             /* indexes */
+	int k, j;             /* indexes */
 	char *s1;             /* parse input string */
 	DragLockPtr pLock;
@@ -538,5 +538,5 @@
 
 	/* for each nibble */
-	for (i = 0; i < NIB_COUNT; i++) {
+	for (k = 0; k < NIB_COUNT; k++) {
 	    /* for each possible set of bits for that nibble */
 	    for (j = 0; j < NIB_SIZE; j++) {
@@ -554,15 +554,15 @@
 		     * if otherbits =0 then only 1 bit set
 		     * so j=fM
-		     * nib_table[i][fM] already calculated if fM has
+		     * nib_table[k][fM] already calculated if fM has
 		     * only 1 bit set.
-		     * nib_table[i][j] has already been filled in
+		     * nib_table[k][j] has already been filled in
 		     * by previous loop. otherwise
-		     * otherbits < j so nibtable[i][otherbits]
+		     * otherbits < j so nibtable[k][otherbits]
 		     * has already been calculated.
 		     */
 		    if (otherbits)
-			pLock->nib_table[i][j] =
-				     pLock->nib_table[i][fM] |
-				     pLock->nib_table[i][otherbits];
+			pLock->nib_table[k][j] =
+				     pLock->nib_table[k][fM] |
+				     pLock->nib_table[k][otherbits];
 
 		}
@@ -3654,11 +3654,11 @@
 	case AUTOPROBE_SWITCH_PROTOCOL:
 	{
-	    MouseProtocolID proto;
+	    MouseProtocolID prot;
 	    void *defaults;
 	    AP_DBG(("State SWITCH_PROTOCOL\n"));
-	    proto = mPriv->protoList[mPriv->protocolID++];
-	    if (proto == PROT_UNKNOWN)
+	    prot = mPriv->protoList[mPriv->protocolID++];
+	    if (prot == PROT_UNKNOWN)
 		mPriv->autoState = AUTOPROBE_SWITCHSERIAL;
-	    else if (!(defaults = GetProtocol(proto)->defaults)
+	    else if (!(defaults = GetProtocol(prot)->defaults)
 		       || (mPriv->serialDefaultsNum == -1
 			   && (defaults == msDefaults))
@@ -3667,6 +3667,6 @@
 			   == defaults)) {
 		AP_DBG(("Changing Protocol to %s\n",
-			ProtocolIDToName(proto)));
-		SetMouseProto(pMse,proto);
+			ProtocolIDToName(prot)));
+		SetMouseProto(pMse,prot);
 		FlushButtons(pMse);
 		RESET_VALIDATION;
Index: /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/pnp.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/pnp.c	(revision 31414)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/xorg70/pnp.c	(revision 31415)
@@ -714,6 +714,6 @@
 	    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 seq2[] = { 243, 200, 243, 200, 243, 80 };
+		if (ps2SendPacket(pInfo,seq2,sizeof(seq2))) {
 		    u = ps2GetDeviceID(pInfo);
 		    if (u == 0x04)
Index: /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/mouse.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/mouse.c	(revision 31414)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/mouse.c	(revision 31415)
@@ -489,5 +489,5 @@
 	int target;           /* target button */
 	int lockM,targetM;    /* bitmasks for drag lock, target */
-	int i, j;             /* indexes */
+	int k, j;             /* indexes */
 	char *s1;             /* parse input string */
 	DragLockPtr pLock;
@@ -553,5 +553,5 @@
 
 	/* for each nibble */
-	for (i = 0; i < NIB_COUNT; i++) {
+	for (k = 0; k < NIB_COUNT; k++) {
 	    /* for each possible set of bits for that nibble */
 	    for (j = 0; j < NIB_SIZE; j++) {
@@ -569,15 +569,15 @@
 		     * if otherbits =0 then only 1 bit set
 		     * so j=fM
-		     * nib_table[i][fM] already calculated if fM has
+		     * nib_table[k][fM] already calculated if fM has
 		     * only 1 bit set.
-		     * nib_table[i][j] has already been filled in
+		     * nib_table[k][j] has already been filled in
 		     * by previous loop. otherwise
-		     * otherbits < j so nibtable[i][otherbits]
+		     * otherbits < j so nibtable[k][otherbits]
 		     * has already been calculated.
 		     */
 		    if (otherbits)
-			pLock->nib_table[i][j] =
-				     pLock->nib_table[i][fM] |
-				     pLock->nib_table[i][otherbits];
+			pLock->nib_table[k][j] =
+				     pLock->nib_table[k][fM] |
+				     pLock->nib_table[k][otherbits];
 
 		}
@@ -3669,11 +3669,11 @@
 	case AUTOPROBE_SWITCH_PROTOCOL:
 	{
-	    MouseProtocolID proto;
+	    MouseProtocolID prot;
 	    void *defaults;
 	    AP_DBG(("State SWITCH_PROTOCOL\n"));
-	    proto = mPriv->protoList[mPriv->protocolID++];
-	    if (proto == PROT_UNKNOWN)
+	    prot = mPriv->protoList[mPriv->protocolID++];
+	    if (prot == PROT_UNKNOWN)
 		mPriv->autoState = AUTOPROBE_SWITCHSERIAL;
-	    else if (!(defaults = GetProtocol(proto)->defaults)
+	    else if (!(defaults = GetProtocol(prot)->defaults)
 		       || (mPriv->serialDefaultsNum == -1
 			   && (defaults == msDefaults))
@@ -3682,6 +3682,6 @@
 			   == defaults)) {
 		AP_DBG(("Changing Protocol to %s\n",
-			ProtocolIDToName(proto)));
-		SetMouseProto(pMse,proto);
+			ProtocolIDToName(prot)));
+		SetMouseProto(pMse,prot);
 		FlushButtons(pMse);
 		RESET_VALIDATION;
Index: /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/pnp.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/pnp.c	(revision 31414)
+++ /trunk/src/VBox/Additions/x11/vboxmouse/xorg71/pnp.c	(revision 31415)
@@ -721,6 +721,6 @@
 	    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 seq2[] = { 243, 200, 243, 200, 243, 80 };
+		if (ps2SendPacket(pInfo,seq2,sizeof(seq2))) {
 		    u = ps2GetDeviceID(pInfo);
 		    if (u == 0x04)
