From 8d8d5cfd8c4f3d25c85d6ed60298f3aa917651eb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 6 Feb 2016 13:32:44 -0800 Subject: xcms: use unsigned indexes when looping through unsigned values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clears many gcc warnings of the form: uvY.c: In function ‘XcmsCIEuvYToCIEXYZ’: uvY.c:263:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < nColors; i++, pColor++) { ^ Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/HVC.c | 4 ++-- nx-X11/lib/X11/LRGB.c | 2 +- nx-X11/lib/X11/Lab.c | 4 ++-- nx-X11/lib/X11/Luv.c | 4 ++-- nx-X11/lib/X11/uvY.c | 4 ++-- nx-X11/lib/X11/xyY.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nx-X11/lib/X11/HVC.c b/nx-X11/lib/X11/HVC.c index f790b1335..c6bf2cda4 100644 --- a/nx-X11/lib/X11/HVC.c +++ b/nx-X11/lib/X11/HVC.c @@ -349,7 +349,7 @@ XcmsTekHVCToCIEuvY( XcmsCIEuvY uvY_return; XcmsFloat tempHue, u, v; XcmsFloat tmpVal; - register int i; + unsigned int i; /* * Check arguments @@ -468,7 +468,7 @@ XcmsCIEuvYToTekHVC( XcmsColor *pColor = pColors_in_out; XcmsColor whitePt; XcmsTekHVC HVC_return; - register int i; + unsigned int i; /* * Check arguments diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c index f8e0d66fb..55e3aaade 100644 --- a/nx-X11/lib/X11/LRGB.c +++ b/nx-X11/lib/X11/LRGB.c @@ -966,7 +966,7 @@ _XcmsGetTableType1( * */ { - int count; + unsigned int count; unsigned int max_index; IntensityRec *pIRec; diff --git a/nx-X11/lib/X11/Lab.c b/nx-X11/lib/X11/Lab.c index 642886ec2..6f7075643 100644 --- a/nx-X11/lib/X11/Lab.c +++ b/nx-X11/lib/X11/Lab.c @@ -251,7 +251,7 @@ XcmsCIELabToCIEXYZ( XcmsCIEXYZ XYZ_return; XcmsFloat tmpFloat, tmpL; XcmsColor whitePt; - int i; + unsigned int i; XcmsColor *pColor = pColors_in_out; /* @@ -354,7 +354,7 @@ XcmsCIEXYZToCIELab( XcmsCIELab Lab_return; XcmsFloat fX_Xn, fY_Yn, fZ_Zn; XcmsColor whitePt; - int i; + unsigned int i; XcmsColor *pColor = pColors_in_out; /* diff --git a/nx-X11/lib/X11/Luv.c b/nx-X11/lib/X11/Luv.c index 8af5ee98b..2bce977ea 100644 --- a/nx-X11/lib/X11/Luv.c +++ b/nx-X11/lib/X11/Luv.c @@ -251,7 +251,7 @@ XcmsCIELuvToCIEuvY( XcmsColor whitePt; XcmsCIEuvY uvY_return; XcmsFloat tmpVal; - register int i; + unsigned int i; /* * Check arguments @@ -343,7 +343,7 @@ XcmsCIEuvYToCIELuv( XcmsColor whitePt; XcmsCIELuv Luv_return; XcmsFloat tmpVal; - register int i; + unsigned int i; /* * Check arguments diff --git a/nx-X11/lib/X11/uvY.c b/nx-X11/lib/X11/uvY.c index 60603a950..0788b7542 100644 --- a/nx-X11/lib/X11/uvY.c +++ b/nx-X11/lib/X11/uvY.c @@ -243,7 +243,7 @@ XcmsCIEuvYToCIEXYZ( { XcmsCIEXYZ XYZ_return; XcmsColor whitePt; - int i; + unsigned int i; XcmsColor *pColor = pColors_in_out; XcmsFloat div, x, y, z, Y; @@ -358,7 +358,7 @@ XcmsCIEXYZToCIEuvY( { XcmsCIEuvY uvY_return; XcmsColor whitePt; - int i; + unsigned int i; XcmsColor *pColor = pColors_in_out; XcmsFloat div; diff --git a/nx-X11/lib/X11/xyY.c b/nx-X11/lib/X11/xyY.c index 67959b048..e85b8d249 100644 --- a/nx-X11/lib/X11/xyY.c +++ b/nx-X11/lib/X11/xyY.c @@ -253,7 +253,7 @@ XcmsCIExyYToCIEXYZ( XcmsCIEXYZ XYZ_return; XcmsFloat div; /* temporary storage in case divisor is zero */ XcmsFloat u, v, x, y, z; /* temporary storage */ - register int i; + unsigned int i; /* * Check arguments @@ -359,7 +359,7 @@ XcmsCIEXYZToCIExyY( XcmsColor *pColor = pColors_in_out; XcmsCIExyY xyY_return; XcmsFloat div; /* temporary storage in case divisor is zero */ - register int i; + unsigned int i; /* * Check arguments -- cgit v1.2.3