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
main
sdong 11 years ago
parent 6a08bc042a
commit d556200264
  1. 2
      db/corruption_test.cc
  2. 2
      db/merge_operator.cc
  3. 4
      util/env_test.cc

@ -387,7 +387,7 @@ TEST(CorruptionTest, FileSystemStateCorrupted) {
DBImpl* dbi = reinterpret_cast<DBImpl*>(db_);
std::vector<LiveFileMetaData> metadata;
dbi->GetLiveFilesMetaData(&metadata);
ASSERT_GT(metadata.size(), 0);
ASSERT_GT(metadata.size(), size_t(0));
std::string filename = dbname_ + metadata[0].name;
delete db_;

@ -23,7 +23,7 @@ bool MergeOperator::PartialMergeMulti(const Slice& key,
std::string temp_value;
Slice temp_slice(operand_list[0]);
for (int i = 1; i < operand_list.size(); ++i) {
for (size_t i = 1; i < operand_list.size(); ++i) {
auto& operand = operand_list[i];
if (!PartialMerge(key, temp_slice, operand, &temp_value, logger)) {
return false;

@ -481,9 +481,9 @@ class TestLogger : public Logger {
if (new_format[0] == '[') {
// "[DEBUG] "
ASSERT_TRUE(n <= 56 + (512 - sizeof(struct timeval)));
ASSERT_TRUE(n <= 56 + (512 - static_cast<int>(sizeof(struct timeval))));
} else {
ASSERT_TRUE(n <= 48 + (512 - sizeof(struct timeval)));
ASSERT_TRUE(n <= 48 + (512 - static_cast<int>(sizeof(struct timeval))));
}
va_end(backup_ap);
}

Loading…
Cancel
Save