[Tarantool-patches] [PATCH 1/5] test: unit/guava -- fix compilation warning

Cyrill Gorcunov gorcunov at gmail.com
Mon May 18 13:14:58 MSK 2020


Convert to uint64_t explicitly.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 test/unit/guava.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/unit/guava.c b/test/unit/guava.c
index 4e3ced76a..fd496af9e 100644
--- a/test/unit/guava.c
+++ b/test/unit/guava.c
@@ -46,7 +46,8 @@ lcg_compat_check()
 		0, 55, 62, 8, 45, 59, 86, 97, 82, 59,
 		73, 37, 17, 56, 86, 21, 90, 37, 38, 83
 	};
-	for (size_t i = 0; i < sizeof(golden100) / sizeof(int64_t); ++i)
+	uint64_t nr_elems = (uint64_t)sizeof(golden100) / sizeof(uint64_t);
+	for (size_t i = 0; i < nr_elems; ++i)
 		check_guava_correctness(golden100[i]);
 
 	fail_if(6     != guava(10863919174838991ULL, 11));
-- 
2.26.2



More information about the Tarantool-patches mailing list