]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fsx: fix signed/unsigned comparison warnings
authorKefu Chai <kchai@redhat.com>
Tue, 12 Jan 2016 03:19:20 +0000 (11:19 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 18 Jan 2016 04:31:30 +0000 (12:31 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librbd/fsx.cc

index 7330b995c3d0b3461db49179179b672489fa3de5..6f44c11d79f06b0c30b909a35f34cbe4c7ba4353 100644 (file)
@@ -1397,12 +1397,12 @@ dowrite(unsigned offset, unsigned size)
                       (debug &&
                       (monitorstart == -1 ||
                        (offset + size > monitorstart &&
-                       (monitorend == -1 || offset <= monitorend))))))
+                        (monitorend == -1 || (long)offset <= monitorend))))))
                prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls,
                    offset, offset + size - 1, size);
 
        ret = ops->write(&ctx, offset, size, good_buf + offset);
-       if (ret != size) {
+       if (ret != (ssize_t)size) {
                if (ret < 0)
                        prterrcode("dowrite: ops->write", ret);
                else
@@ -1442,7 +1442,7 @@ dotruncate(unsigned size)
 
        if ((progressinterval && testcalls % progressinterval == 0) ||
            (debug && (monitorstart == -1 || monitorend == -1 ||
-                     size <= monitorend)))
+                      (long)size <= monitorend)))
                prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size);
 
        ret = ops->resize(&ctx, size);
@@ -1485,7 +1485,7 @@ do_punch_hole(unsigned offset, unsigned length)
 
        if ((progressinterval && testcalls % progressinterval == 0) ||
            (debug && (monitorstart == -1 || monitorend == -1 ||
-                     end_offset <= monitorend))) {
+                      (long)end_offset <= monitorend))) {
                prt("%lu punch\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls,
                        offset, offset+length, length);
        }