Commit 68e3ee67 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

xcms: use size_t for pointer offsets passed to strncmp

instead of converting to int and back Fixes clang warnings of the form: HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) { ~~~~~~~ Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 8d8d5cfd
......@@ -176,13 +176,13 @@ TekHVC_ParseString(
* XcmsSuccess if valid.
*/
{
int n;
size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
n = (int)(pchar - spec);
n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
......
......@@ -1405,13 +1405,13 @@ XcmsLRGB_RGBi_ParseString(
* 0 if failed, non-zero otherwise.
*/
{
int n;
size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
n = (int)(pchar - spec);
n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
......
......@@ -120,13 +120,13 @@ CIEXYZ_ParseString(
* RETURNS
*/
{
int n;
size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
n = (int)(pchar - spec);
n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
......
......@@ -126,13 +126,13 @@ _XcmsColorSpaceOfString(
*/
{
XcmsColorSpace **papColorSpaces;
int n;
size_t n;
char *pchar;
if ((pchar = strchr(color_string, ':')) == NULL) {
return(XcmsFailure);
}
n = (int)(pchar - color_string);
n = (size_t)(pchar - color_string);
if (ccc == NULL) {
return(NULL);
......
......@@ -135,13 +135,13 @@ CIEuvY_ParseString(
* 0 if failed, non-zero otherwise.
*/
{
int n;
size_t n;
char *pchar;
if ((pchar = strchr(spec, ':')) == NULL) {
return(XcmsFailure);
}
n = (int)(pchar - spec);
n = (size_t)(pchar - spec);
/*
* Check for proper prefix.
......
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