diff --git a/db/corruption_test.cc b/db/corruption_test.cc index 2e630c11b..f0397b6f5 100644 --- a/db/corruption_test.cc +++ b/db/corruption_test.cc @@ -387,7 +387,7 @@ TEST(CorruptionTest, FileSystemStateCorrupted) { DBImpl* dbi = reinterpret_cast(db_); std::vector 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_; diff --git a/db/merge_operator.cc b/db/merge_operator.cc index a01d389e9..a14df8a87 100644 --- a/db/merge_operator.cc +++ b/db/merge_operator.cc @@ -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; diff --git a/util/env_test.cc b/util/env_test.cc index b7009bf5d..0a83037c3 100644 --- a/util/env_test.cc +++ b/util/env_test.cc @@ -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(sizeof(struct timeval)))); } else { - ASSERT_TRUE(n <= 48 + (512 - sizeof(struct timeval))); + ASSERT_TRUE(n <= 48 + (512 - static_cast(sizeof(struct timeval)))); } va_end(backup_ap); }