From 9e0db673a7869861eeb6eccbc8270a019f4aacd1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 20 Nov 2022 10:31:39 -0800 Subject: Resolve -Wsign-compare warnings from gcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XRes.c: In function ‘XResQueryClients’: XRes.c:121:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < rep.num_clients; i++) { ^ XRes.c: In function ‘XResQueryClientResources’: XRes.c:176:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < rep.num_types; i++) { ^ Signed-off-by: Alan Coopersmith --- src/XRes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XRes.c b/src/XRes.c index 506ca9e..fd130a8 100644 --- a/src/XRes.c +++ b/src/XRes.c @@ -118,7 +118,7 @@ XResQueryClients(Display *dpy, int *num_clients, XResClient **clients) clnts = NULL; if (clnts != NULL) { - for (int i = 0; i < rep.num_clients; i++) { + for (CARD32 i = 0; i < rep.num_clients; i++) { xXResClient scratch; _XRead(dpy, (char *) &scratch, sz_xXResClient); @@ -173,7 +173,7 @@ XResQueryClientResources(Display *dpy, XID xid, typs = NULL; if (typs != NULL) { - for (int i = 0; i < rep.num_types; i++) { + for (CARD32 i = 0; i < rep.num_types; i++) { xXResType scratch; _XRead(dpy, (char *) &scratch, sz_xXResType); -- cgit v1.2.1