summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-01-08 21:21:18 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-01-08 21:21:18 -0800
commit4623258b48f01306309ff9d39a85565bce57946e (patch)
tree05a6e8537641fd73d372700feafa0224ae46e0c8
parent6f14e8569150b0d6fac7186968cde8b031a1fefc (diff)
Clear assorted compiler, sparse & lint warnings
mouse.c:1004:35: warning: Using plain integer as NULL pointer sun_mouse.c:325: warning: 'absX' might be used uninitialized in this function sun_mouse.c:325: warning: 'absY' might be used uninitialized in this function sun_mouse.c: (158) warning: constant truncated by assignment declared global, could be static: hardProtocolList mouse.c(3151) softProtocolList mouse.c(3163) serialDefaultsList mouse.c(3366)
-rw-r--r--src/mouse.c8
-rw-r--r--src/sun_mouse.c4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/mouse.c b/src/mouse.c
index 8adfba4..45d7b85 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1001,7 +1001,7 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pInfo->fd = -1;
pInfo->dev = NULL;
pInfo->private_flags = 0;
- pInfo->always_core_feedback = 0;
+ pInfo->always_core_feedback = NULL;
pInfo->conf_idev = dev;
/* Check if SendDragEvents has been disabled. */
@@ -3148,6 +3148,7 @@ ps2WakeupHandler(pointer data, int i, pointer LastSelectMask)
# define AP_DBGC(x)
#endif
+static
MouseProtocolID hardProtocolList[] = { PROT_MSC, PROT_MM, PROT_LOGI,
PROT_LOGIMAN, PROT_MMHIT,
PROT_GLIDE, PROT_IMSERIAL,
@@ -3160,6 +3161,7 @@ MouseProtocolID hardProtocolList[] = { PROT_MSC, PROT_MM, PROT_LOGI,
PROT_UNKNOWN
};
+static
MouseProtocolID softProtocolList[] = { PROT_MSC, PROT_MM, PROT_LOGI,
PROT_LOGIMAN, PROT_MMHIT,
PROT_GLIDE, PROT_IMSERIAL,
@@ -3287,7 +3289,7 @@ createProtoList(MouseDevPtr pMse, MouseProtocolID *protoList)
break;
} else {
/*
- * Bail ot if number of bytes per package have
+ * Bail out if number of bytes per package have
* been tested for header.
* Take bytes per package of leading garbage into
* account.
@@ -3363,7 +3365,7 @@ createProtoList(MouseDevPtr pMse, MouseProtocolID *protoList)
/* This only needs to be done once */
-void **serialDefaultsList = NULL;
+static void **serialDefaultsList = NULL;
/*
* createSerialDefaultsLists() - create a list of the different default
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 827af34..1f01f17 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -155,7 +155,7 @@ vuidMouseWheelInit(InputInfoPtr pInfo)
wstate.vers = VUID_WHEEL_STATE_VERS;
wstate.id = 0;
- wstate.stateflags = -1;
+ wstate.stateflags = (uint32_t) -1;
SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel));
if (i != 0)
@@ -322,7 +322,7 @@ vuidReadInput(InputInfoPtr pInfo)
unsigned int n;
int c;
unsigned char *pBuf;
- int absX, absY;
+ int absX = 0, absY = 0;
Bool absXset = FALSE, absYset = FALSE;
pMse = pInfo->private;