summaryrefslogtreecommitdiff
path: root/xstdcmap.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-03-09 20:31:22 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-03-09 20:34:37 -0800
commitbffe5030b03af5afb67dbeb053016ffc7569f48a (patch)
tree9037065ad3e9c19cc6e6b5a42a4820e5711d4a7e /xstdcmap.c
parent385e447e3aecd40db2b0f2110308663b3bc478f6 (diff)
Fix -Wsign-compare warnings
xstdcmap.c: In function ‘parse’: xstdcmap.c:152:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0; i < NPROPERTIES; i++) { ^ xstdcmap.c: In function ‘getDeepestVisual’: xstdcmap.c:220:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (vinfo->class == visual_class && vinfo->depth > maxdepth) ^ xstdcmap.c: In function ‘doIndividualColormaps’: xstdcmap.c:288:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0; i < NPROPERTIES; i++) { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xstdcmap.c')
-rw-r--r--xstdcmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xstdcmap.c b/xstdcmap.c
index 970da6d..99fcf4b 100644
--- a/xstdcmap.c
+++ b/xstdcmap.c
@@ -148,7 +148,7 @@ parse(int argc, char **argv)
snprintf(option, sizeof(option), "%s%s", program_name, ".delete");
if (XrmGetResource(database, option, (char *) NULL, &type, &value)) {
- register int i;
+ unsigned int i;
for (i=0; i < NPROPERTIES; i++) {
if (strcmp((char *) value.addr, propertyTable[i].nickname) == 0) {
propertyTable[i].delete++;
@@ -213,7 +213,7 @@ getDeepestVisual(int visual_class, /* specifies the desired visual class */
int nvisuals) /* specifies number of visuals in the list */
{
register int i;
- unsigned int maxdepth = 0;
+ int maxdepth = 0;
XVisualInfo *v = NULL;
for (i=0; i < nvisuals; i++, vinfo++)
@@ -276,7 +276,8 @@ visualStringFromClass(int class)
static int
doIndividualColormaps(void)
{
- int i, screen, nvisuals;
+ unsigned int i;
+ int screen, nvisuals;
Status status = -1;
XVisualInfo *vinfo = NULL, *v = NULL, template;