summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:44:59 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:44:59 -0700
commit8213b7070c039ea16d0112eff01cc7420031c089 (patch)
tree2ef613377eb8e5cf0e899de1122aca4f334a79ae
parentcaee4c2bf188484f117e5bd866e3b56c8506593e (diff)
Fix sign comparison warning in loop indexes in FSQueryXBitmaps{8,16}
FSQGlyphs.c: In function ‘FSQueryXBitmaps8’: FSQGlyphs.c:113:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0; i<reply.num_chars; i++) ^ FSQGlyphs.c: In function ‘FSQueryXBitmaps16’: FSQGlyphs.c:160:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < str_len; i++) { ^ FSQGlyphs.c:198:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0; i<reply.num_chars; i++) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/FSQGlyphs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/FSQGlyphs.c b/src/FSQGlyphs.c
index 0c6523e..ddc02e6 100644
--- a/src/FSQGlyphs.c
+++ b/src/FSQGlyphs.c
@@ -71,7 +71,6 @@ FSQueryXBitmaps8(
fsOffset32 local_offs;
unsigned char *gd;
int left;
- int i;
GetReq(QueryXBitmaps8, req);
req->fid = fid;
@@ -110,7 +109,7 @@ FSQueryXBitmaps8(
FSfree(offs);
return FSBadAlloc;
}
- for (i=0; i<reply.num_chars; i++)
+ for (CARD32 i = 0; i < reply.num_chars; i++)
{
_FSReadPad(svr, (char *) &local_offs, (SIZEOF(fsOffset32)));
offs->position = local_offs.position;
@@ -140,7 +139,6 @@ FSQueryXBitmaps16(
fsOffset32 local_offs;
unsigned char *gd;
int left;
- int i;
GetReq(QueryXBitmaps16, req);
req->fid = fid;
@@ -157,7 +155,7 @@ FSQueryXBitmaps16(
swapped_str = FSmalloc(SIZEOF(fsChar2b_version1) * str_len);
if (!swapped_str)
return FSBadAlloc;
- for (i = 0; i < str_len; i++) {
+ for (unsigned long i = 0; i < str_len; i++) {
swapped_str[i].low = str[i].low;
swapped_str[i].high = str[i].high;
}
@@ -195,7 +193,7 @@ FSQueryXBitmaps16(
FSfree(offs);
return FSBadAlloc;
}
- for (i=0; i<reply.num_chars; i++)
+ for (CARD32 i = 0; i < reply.num_chars; i++)
{
_FSReadPad(svr, (char *) &local_offs, (SIZEOF(fsOffset32)));
offs->position = local_offs.position;