Skip to content

Commit d556200

Browse files
committed
Some small cleaning up to make some compiling environment happy
Summary: Compiler complains some errors when building using our internal build settings. Fix them. Test Plan: rebuild Reviewers: haobo, dhruba, igor, yhchiang, ljin Reviewed By: igor CC: leveldb Differential Revision: https://reviews.facebook.net/D17199
1 parent 6a08bc0 commit d556200

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

db/corruption_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ TEST(CorruptionTest, FileSystemStateCorrupted) {
387387
DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
388388
std::vector<LiveFileMetaData> metadata;
389389
dbi->GetLiveFilesMetaData(&metadata);
390-
ASSERT_GT(metadata.size(), 0);
390+
ASSERT_GT(metadata.size(), size_t(0));
391391
std::string filename = dbname_ + metadata[0].name;
392392

393393
delete db_;

db/merge_operator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bool MergeOperator::PartialMergeMulti(const Slice& key,
2323
std::string temp_value;
2424
Slice temp_slice(operand_list[0]);
2525

26-
for (int i = 1; i < operand_list.size(); ++i) {
26+
for (size_t i = 1; i < operand_list.size(); ++i) {
2727
auto& operand = operand_list[i];
2828
if (!PartialMerge(key, temp_slice, operand, &temp_value, logger)) {
2929
return false;

util/env_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ class TestLogger : public Logger {
481481

482482
if (new_format[0] == '[') {
483483
// "[DEBUG] "
484-
ASSERT_TRUE(n <= 56 + (512 - sizeof(struct timeval)));
484+
ASSERT_TRUE(n <= 56 + (512 - static_cast<int>(sizeof(struct timeval))));
485485
} else {
486-
ASSERT_TRUE(n <= 48 + (512 - sizeof(struct timeval)));
486+
ASSERT_TRUE(n <= 48 + (512 - static_cast<int>(sizeof(struct timeval))));
487487
}
488488
va_end(backup_ap);
489489
}

0 commit comments

Comments
 (0)