aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2016-02-06 14:18:32 -0800
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:30 +0200
commit68e3ee67c07282c11cd144fbdb767b41a6dacc4e (patch)
treec7081199596bc2be74d1889bc053f2071fd4c3cc
parent8d8d5cfd8c4f3d25c85d6ed60298f3aa917651eb (diff)
downloadnx-libs-68e3ee67c07282c11cd144fbdb767b41a6dacc4e.tar.gz
nx-libs-68e3ee67c07282c11cd144fbdb767b41a6dacc4e.tar.bz2
nx-libs-68e3ee67c07282c11cd144fbdb767b41a6dacc4e.zip
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: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
-rw-r--r--nx-X11/lib/X11/HVC.c4
-rw-r--r--nx-X11/lib/X11/LRGB.c4
-rw-r--r--nx-X11/lib/X11/XYZ.c4
-rw-r--r--nx-X11/lib/X11/cmsColNm.c4
-rw-r--r--nx-X11/lib/X11/uvY.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/lib/X11/HVC.c b/nx-X11/lib/X11/HVC.c
index c6bf2cda4..98d7142c3 100644
--- a/nx-X11/lib/X11/HVC.c
+++ b/nx-X11/lib/X11/HVC.c
@@ -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.
diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c
index 55e3aaade..4bfa3cfb1 100644
--- a/nx-X11/lib/X11/LRGB.c
+++ b/nx-X11/lib/X11/LRGB.c
@@ -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.
diff --git a/nx-X11/lib/X11/XYZ.c b/nx-X11/lib/X11/XYZ.c
index 1245622b7..826565773 100644
--- a/nx-X11/lib/X11/XYZ.c
+++ b/nx-X11/lib/X11/XYZ.c
@@ -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.
diff --git a/nx-X11/lib/X11/cmsColNm.c b/nx-X11/lib/X11/cmsColNm.c
index 0e96e13a3..e43a829f2 100644
--- a/nx-X11/lib/X11/cmsColNm.c
+++ b/nx-X11/lib/X11/cmsColNm.c
@@ -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);
diff --git a/nx-X11/lib/X11/uvY.c b/nx-X11/lib/X11/uvY.c
index 0788b7542..19e6c5232 100644
--- a/nx-X11/lib/X11/uvY.c
+++ b/nx-X11/lib/X11/uvY.c
@@ -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.