From: Adam C. Emerson Date: Fri, 17 Jul 2020 06:56:50 +0000 (-0400) Subject: test/osdc: Silence implicit conversion warning X-Git-Tag: wip-pdonnell-testing-20200918.022351~598^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=721ef6352db9667c22a572eb832cd861126e62cb;p=ceph-ci.git test/osdc: Silence implicit conversion warning By converting explicitly. Signed-off-by: Adam C. Emerson --- diff --git a/src/test/osdc/object_cacher_stress.cc b/src/test/osdc/object_cacher_stress.cc index 065ea8c453f..371117ef6f2 100644 --- a/src/test/osdc/object_cacher_stress.cc +++ b/src/test/osdc/object_cacher_stress.cc @@ -93,7 +93,7 @@ int stress_test(uint64_t num_ops, uint64_t num_objs, // no zero-length operations uint64_t length = random() % (std::max(max_len - 1, 1)) + 1; std::string oid = "test" + stringify(random() % num_objs); - bool is_read = random() < percent_reads * RAND_MAX; + bool is_read = random() < percent_reads * float(RAND_MAX); std::shared_ptr op(new op_data(oid, offset, length, is_read)); ops.push_back(op); std::cout << "op " << i << " " << (is_read ? "read" : "write")