From: Kefu Chai Date: Wed, 17 Aug 2016 07:17:35 +0000 (+0800) Subject: test/rbd: silence compiling warnings X-Git-Tag: v11.0.1~424^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7b9433c2b8275ba82147c223b68aeb0d9b653c3f;p=ceph.git 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 --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index 0651d2e61977..6fb5700c6213 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);