diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-30 15:53:22 +1000 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-30 13:36:44 -0700 |
commit | 7c1e63ef00777553cca66781b8db0272bd405db0 (patch) | |
tree | fe9b0439ee2d24f801141fc264e2fd9a43fbd924 /src | |
parent | 3c0c022672324286b0e936977ca267c6b04dc0f2 (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mouse.c | 14 | ||||
-rw-r--r-- | src/pnp.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mouse.c b/src/mouse.c index 70ea7fb..719b1fa 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -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; |