From 1e426be033253d464817a6c3128f3e6e94a1524f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 12 Jan 2016 11:19:20 +0800 Subject: [PATCH] fsx: fix signed/unsigned comparison warnings Signed-off-by: Kefu Chai --- src/test/librbd/fsx.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index 7330b995c3d0b..6f44c11d79f06 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -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); } -- 2.39.5