mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-06 18:38:03 +02:00
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>
This commit is contained in:
parent
4de6ed3e7b
commit
0ee0d383b4
2 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue