aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/IdOfPr.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2016-02-06 13:01:25 -0800
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:30 +0200
commit327d2cc6047683abb36cab25a90633c7b8d9b036 (patch)
tree96c87803b0ab154cbcbf79a4afec0a62f90043a1 /nx-X11/lib/X11/IdOfPr.c
parentde4047722a243f1be2212d1af6002247c5c3c733 (diff)
downloadnx-libs-327d2cc6047683abb36cab25a90633c7b8d9b036.tar.gz
nx-libs-327d2cc6047683abb36cab25a90633c7b8d9b036.tar.bz2
nx-libs-327d2cc6047683abb36cab25a90633c7b8d9b036.zip
xcms: use size_t for strlen/sizeof values instead of converting to int & back
Fixes gcc warnings of the form: IdOfPr.c: In function ‘XcmsFormatOfPrefix’: IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((len = strlen(prefix)) >= sizeof(string_buf)) { ^ IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/IdOfPr.c')
-rw-r--r--nx-X11/lib/X11/IdOfPr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/IdOfPr.c b/nx-X11/lib/X11/IdOfPr.c
index e15f34fec..9f43dd387 100644
--- a/nx-X11/lib/X11/IdOfPr.c
+++ b/nx-X11/lib/X11/IdOfPr.c
@@ -61,7 +61,7 @@ XcmsFormatOfPrefix(char *prefix)
XcmsColorSpace **papColorSpaces;
char string_buf[64];
char *string_lowered;
- int len;
+ size_t len;
/*
* While copying prefix to string_lowered, convert to lowercase