提交 77dc069e 编写于 作者: F Fosco Marotto 提交者: Facebook Github Bot

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
上级 f3fe6f88
......@@ -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<unsigned int>(start_i); i < end_i; i++) {
Init(args[i]);
Random rnd(test::RandomSeed() + 5);
for (int num_entries = 0; num_entries < 2000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册