You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2021/05/26 21:48:00 UTC
[datasketches-cpp] 01/01: avoid warnings
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch avoid_warnings
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
commit 92735535f672af1b4d8230b00448a3b1da7f27d0
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Wed May 26 14:47:23 2021 -0700
avoid warnings
---
sampling/test/var_opt_union_test.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sampling/test/var_opt_union_test.cpp b/sampling/test/var_opt_union_test.cpp
index f9b653b..964e869 100644
--- a/sampling/test/var_opt_union_test.cpp
+++ b/sampling/test/var_opt_union_test.cpp
@@ -40,8 +40,8 @@ static constexpr double EPS = 1e-13;
static var_opt_sketch<int> create_unweighted_sketch(uint32_t k, uint64_t n) {
var_opt_sketch<int> sk(k);
- for (int i = 0; i < n; ++i) {
- sk.update(i, 1.0);
+ for (uint64_t i = 0; i < n; ++i) {
+ sk.update(static_cast<int>(i), 1.0);
}
return sk;
}
@@ -193,7 +193,7 @@ TEST_CASE("varopt union: two exact sketches", "[var_opt_union]") {
u.update(sk2);
var_opt_sketch<int> result = u.get_result();
- REQUIRE(result.get_n() == 2 * n);
+ REQUIRE(result.get_n() == 2ULL * n);
REQUIRE(result.get_k() == k);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org