From 77dc069eb92fb833b434183ed055b5c8b1042543 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Tue, 30 Jan 2018 11:06:35 -0800 Subject: [PATCH] Change size_t cast in table_test Summary: Fixes this build error on master (macOS): ``` table/table_test.cc:972:27: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32] ``` Closes https://github.com/facebook/rocksdb/pull/3434 Reviewed By: maysamyabandeh Differential Revision: D6840354 Pulled By: gfosco fbshipit-source-id: fffac6aefbbdd134ce1299453c5590aa855a5fc8 --- table/table_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/table_test.cc b/table/table_test.cc index a3db1c5d99..02cf156d7f 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -969,7 +969,7 @@ class HarnessTest : public testing::Test { assert(part <= total); size_t start_i = (part - 1) * args.size() / total; size_t end_i = part * args.size() / total; - for (unsigned int i = start_i; i < end_i; i++) { + for (unsigned int i = static_cast(start_i); i < end_i; i++) { Init(args[i]); Random rnd(test::RandomSeed() + 5); for (int num_entries = 0; num_entries < 2000;