From 7b9433c2b8275ba82147c223b68aeb0d9b653c3f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 17 Aug 2016 15:17:35 +0800 Subject: [PATCH] test/rbd: silence compiling warnings silence warnings like: ``` src/test/librbd/fsx.cc:1589:21: comparison between signed and unsigned integer expressions [-Wsign-compare] (offset + size > monitorstart && ^ ``` Signed-off-by: Kefu Chai --- src/test/librbd/fsx.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index 0651d2e61977b..6fb5700c6213f 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -1586,8 +1586,9 @@ doread(unsigned offset, unsigned size) ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || - (offset + size > monitorstart && - (monitorend == -1 || offset <= monitorend)))))) + (static_cast(offset + size) > monitorstart && + (monitorend == -1 || + static_cast(offset) <= monitorend)))))) prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); @@ -1686,8 +1687,9 @@ dowrite(unsigned offset, unsigned size) ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || - (offset + size > monitorstart && - (monitorend == -1 || (long)offset <= monitorend)))))) + (static_cast(offset + size) > monitorstart && + (monitorend == -1 || + static_cast(offset) <= monitorend)))))) prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); -- 2.39.5