Commit 7c1e63ef authored by Peter Hutterer's avatar Peter Hutterer Committed by Alan Coopersmith

Fix compiler warnings

pnp.c: In function 'probePs2ProtocolPnP':
pnp.c:711:31: warning: declaration of 'seq' shadows a previous local
[-Wshadow]
pnp.c:705:23: warning: shadowed declaration is here [-Wshadow]

mouse.c: In function 'MouseCommonOptions':
mouse.c:330:13: warning: declaration of 'i' shadows a previous local
[-Wshadow]
mouse.c:279:9: warning: shadowed declaration is here [-Wshadow]

mouse.c: In function 'autoProbeMouse':
mouse.c:3602:29: warning: declaration of 'proto' shadows a global
declaration [-Wshadow]
mouse.c:2482:22: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent 3c0c0226
......@@ -327,7 +327,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
int lock; /* lock button */
int target; /* target button */
int lockM,targetM; /* bitmasks for drag lock, target */
int i, j; /* indexes */
int j; /* indexes */
char *s1; /* parse input string */
DragLockPtr pLock;
......@@ -3599,14 +3599,14 @@ autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync)
}
case AUTOPROBE_SWITCH_PROTOCOL:
{
MouseProtocolID proto;
MouseProtocolID prot;
MouseProtocolPtr pProto;
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 (!((pProto = GetProtocol(proto)) &&
else if (!((pProto = GetProtocol(prot)) &&
((defaults = pProto->defaults)))
|| (mPriv->serialDefaultsNum == -1
&& (defaults == msDefaults))
......@@ -3614,8 +3614,8 @@ autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync)
&& serialDefaultsList[mPriv->serialDefaultsNum]
== defaults)) {
AP_DBG(("Changing Protocol to %s\n",
ProtocolIDToName(proto)));
SetMouseProto(pMse,proto);
ProtocolIDToName(prot)));
SetMouseProto(pMse,prot);
FlushButtons(pMse);
RESET_VALIDATION;
mPriv->autoState = AUTOPROBE_VALIDATE2;
......
......@@ -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 im_seq[] = { 243, 200, 243, 200, 243, 80 };
if (ps2SendPacket(pInfo,im_seq,sizeof(im_seq))) {
u = ps2GetDeviceID(pInfo);
if (u == 0x04)
ret = PROT_EXPPS2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment