summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-16 11:47:18 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-16 11:48:22 -0700
commitf62f35747ec65e7f8819fab2c928db1b1b4c56eb (patch)
tree64be6ff19a9cfa4c9df8abd0fd350d7446be889f
parent2d963a9f619420834274cedf407b754caecbccb3 (diff)
sun_mouse: Fix -Wsign-compare warnings
sun_mouse.c: In function ‘vuidReadInput’: sun_mouse.c:299:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } else if (n == -1) { ^~ sun_mouse.c: In function ‘vuidMouseProc’: sun_mouse.c:507:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (vuidMouseGeneration != serverGeneration) { ^~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/sun_mouse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index b092374..8328c46 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -118,7 +118,7 @@ static void vuidReadInput(InputInfoPtr pInfo);
static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse);
static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL);
-static int vuidMouseGeneration = 0;
+static unsigned long vuidMouseGeneration = 0;
#if HAS_DEVPRIVATEKEYREC
static DevPrivateKeyRec vuidMouseScreenIndex;
@@ -280,7 +280,7 @@ vuidReadInput(InputInfoPtr pInfo)
VuidMsePtr pVuidMse;
int buttons;
int dx = 0, dy = 0, dz = 0, dw = 0;
- unsigned int n;
+ ssize_t n;
unsigned char *pBuf;
int absX = 0, absY = 0;
Bool absXset = FALSE, absYset = FALSE;
@@ -324,7 +324,7 @@ vuidReadInput(InputInfoPtr pInfo)
return;
}
} else if (n != sizeof(Firm_event)) {
- xf86Msg(X_WARNING, "%s: incomplete packet, size %d\n",
+ xf86Msg(X_WARNING, "%s: incomplete packet, size %zd\n",
pInfo->name, n);
}