From 03fb2ae36be7314416b1c57b391039fb948468eb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 16 Oct 2022 12:02:51 -0700 Subject: SetupMouse: fix -Wsign-compare warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mouse.c: In function ‘SetupMouse’: mouse.c:2620:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < sizeof(pMse->protoPara); i++) ^ Signed-off-by: Alan Coopersmith --- src/mouse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mouse.c b/src/mouse.c index e06dbc6..4cb9de1 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2586,7 +2586,6 @@ static Bool SetupMouse(InputInfoPtr pInfo) { MouseDevPtr pMse; - int i; int protoPara[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; const char *name = NULL; Bool automatic = FALSE; @@ -2617,7 +2616,7 @@ SetupMouse(InputInfoPtr pInfo) if (automatic) { if (name) { /* Possible protoPara overrides from SetupAuto. */ - for (i = 0; i < sizeof(pMse->protoPara); i++) + for (size_t i = 0; i < sizeof(pMse->protoPara); i++) if (protoPara[i] != -1) pMse->protoPara[i] = protoPara[i]; /* if we come here PnP/OS mouse probing was successful */ -- cgit v1.2.1