Commit 327d2cc6 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

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: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent de404772
......@@ -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
......
......@@ -198,7 +198,7 @@ _XcmsParseColorString(
XcmsColorSpace *pColorSpace;
char string_buf[64];
char *string_lowered;
int len;
size_t len;
int res;
if (ccc == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment