diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-13 16:28:37 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-13 16:28:37 -0700 |
commit | 7185a8a484de41c878149e23848c903893936e14 (patch) | |
tree | 34c562e0536a4a332fc9f2bbe8a6fe35a71d87ef | |
parent | 7b63db9adf687e360a1e348aabbbc16265104fc2 (diff) | |
download | xorg-lib-libXmu-7185a8a484de41c878149e23848c903893936e14.tar.gz |
Handle -Wsign-compare warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/AllCmap.c | 2 | ||||
-rw-r--r-- | src/CursorName.c | 2 | ||||
-rw-r--r-- | src/StdCmap.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/AllCmap.c b/src/AllCmap.c index a974ce0..07edf38 100644 --- a/src/AllCmap.c +++ b/src/AllCmap.c @@ -110,7 +110,7 @@ XmuAllStandardColormaps(Display *dpy) v2 = getDeepestVisual(PseudoColor, vinfo, nvisuals); if (v2 && - (!v1 || (v2->colormap_size >= + (!v1 || (v2->colormap_size >= (long) ((v1->red_mask | v1->green_mask | v1->blue_mask) + 1)))) status = XmuVisualStandardColormaps(dpy, scr, v2->visualid, (unsigned) v2->depth, 1, 1); diff --git a/src/CursorName.c b/src/CursorName.c index 635ae51..82bc5fa 100644 --- a/src/CursorName.c +++ b/src/CursorName.c @@ -119,7 +119,7 @@ XmuCursorNameToIndex(_Xconst char *name) }; #define NUM_CURSOR_NAMES (sizeof (cursor_names) / sizeof (cursor_names[0])) register _Xconst struct _CursorName *table; - register int i; + unsigned int i; char tmp[40]; if (strlen (name) >= sizeof tmp) return -1; diff --git a/src/StdCmap.c b/src/StdCmap.c index ccc822e..4da007b 100644 --- a/src/StdCmap.c +++ b/src/StdCmap.c @@ -190,11 +190,11 @@ valid_args(XVisualInfo *vinfo, unsigned long red_max, unsigned long green_max, return 0; } else if (property == XA_RGB_GRAY_MAP) { ncolors = red_max + green_max + blue_max + 1; - if (ncolors > vinfo->colormap_size) + if (ncolors > (unsigned long) vinfo->colormap_size) return 0; } else { ncolors = (red_max + 1) * (green_max + 1) * (blue_max + 1); - if (ncolors > vinfo->colormap_size) + if (ncolors > (unsigned long) vinfo->colormap_size) return 0; } |