summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:34:04 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:34:04 -0700
commitb37bbeb7ca931b0f5170e877b0bbfd0959d344b7 (patch)
tree23f10dfd7849ad158ef5dd49fdbccb2e6a413b63
parentfed3794a5204eace3926f13573b10f0b51f85fbc (diff)
Fix sign comparison warning in loop index in FSListFontsWithXInfo
FSFontInfo.c: In function ‘FSListFontsWithXInfo’: FSFontInfo.c:182:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j=0; j<pi[i]->num_offsets; j++) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/FSFontInfo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/FSFontInfo.c b/src/FSFontInfo.c
index b51e043..39539c1 100644
--- a/src/FSFontInfo.c
+++ b/src/FSFontInfo.c
@@ -65,8 +65,7 @@ FSListFontsWithXInfo(
unsigned char ***prop_data)
{
long nbytes;
- int i,
- j;
+ int i;
size_t size = 0;
FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) NULL;
FSPropInfo **pi = (FSPropInfo **) NULL;
@@ -179,7 +178,7 @@ FSListFontsWithXInfo(
if (!pd[i])
goto cleanpo;
/* get offsets */
- for (j=0; j<pi[i]->num_offsets; j++)
+ for (unsigned int j = 0; j < pi[i]->num_offsets; j++)
{
_FSReadPad(svr, (char *) &local_po, SIZEOF(fsPropOffset));
po[i][j].name.position = local_po.name.position;
@@ -230,7 +229,7 @@ cleanfhdr:
FSfree(fhdr[i]);
/* Error cleanup for all previously filled in items in the arrays */
badmem:
- for (j = (i - 1); j >= 0; j--) {
+ for (int j = (i - 1); j >= 0; j--) {
FSfree(pi[j]);
FSfree(po[j]);
FSfree(pd[j]);