summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:47:35 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 13:47:35 -0700
commit3eb9c6bbfb4e6caf6efb5dec8744f257c2d63be7 (patch)
tree381c6c8e5e45cf1a62e430609aab446efd273e4c
parent8213b7070c039ea16d0112eff01cc7420031c089 (diff)
Fix sign comparison warning in loop indexes in FSQueryXExtents{8,16}
FSQXExt.c: In function ‘FSQueryXExtents8’: FSQXExt.c:105:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < reply.num_extents; i++) { ^ FSQXExt.c: In function ‘FSQueryXExtents16’: FSQXExt.c:141:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < str_len; i++) { ^ FSQXExt.c:165:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < reply.num_extents; i++) { ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/FSQXExt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/FSQXExt.c b/src/FSQXExt.c
index 4ad63ac..82bab7b 100644
--- a/src/FSQXExt.c
+++ b/src/FSQXExt.c
@@ -78,7 +78,6 @@ FSQueryXExtents8(
fsQueryXExtents8Reply reply;
FSXCharInfo *ext;
fsXCharInfo local_exts;
- int i;
GetReq(QueryXExtents8, req);
req->fid = fid;
@@ -102,7 +101,7 @@ FSQueryXExtents8(
*extents = ext;
if (!ext)
return FSBadAlloc;
- for (i = 0; i < reply.num_extents; i++) {
+ for (CARD32 i = 0; i < reply.num_extents; i++) {
_FSReadPad(svr, (char *) &local_exts, SIZEOF(fsXCharInfo));
_FS_convert_char_info(&local_exts, &ext[i]);
}
@@ -124,7 +123,6 @@ FSQueryXExtents16(
fsQueryXExtents16Reply reply;
FSXCharInfo *ext;
fsXCharInfo local_exts;
- int i;
GetReq(QueryXExtents16, req);
req->fid = fid;
@@ -138,7 +136,7 @@ FSQueryXExtents16(
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;
}
@@ -162,7 +160,7 @@ FSQueryXExtents16(
*extents = ext;
if (!ext)
return FSBadAlloc;
- for (i = 0; i < reply.num_extents; i++) {
+ for (CARD32 i = 0; i < reply.num_extents; i++) {
_FSReadPad(svr, (char *) &local_exts, SIZEOF(fsXCharInfo));
_FS_convert_char_info(&local_exts, &ext[i]);
}