mirror of
https://github.com/X11Libre/xf86-input-mouse.git
synced 2026-03-24 01:24:06 +00:00
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>
This commit is contained in:
committed by
Alan Coopersmith
parent
3c0c022672
commit
7c1e63ef00
14
src/mouse.c
14
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;
|
||||
|
||||
Reference in New Issue
Block a user