Fix clang compiler warnings

main
Chilledheart 10 years ago
parent f4c49aeade
commit 54f4e2f188
  1. 8
      db/db_iter_test.cc
  2. 6
      db/version_set_test.cc
  3. 2
      table/plain_table_reader.h
  4. 4
      utilities/document/json_document_test.cc

@ -323,23 +323,23 @@ TEST(DBIteratorTest, DBIteratorUseSkipCountSkips) {
ASSERT_TRUE(db_iter->Valid());
ASSERT_EQ(db_iter->key().ToString(), "c");
ASSERT_EQ(db_iter->value().ToString(), "c");
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 1);
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 1u);
db_iter->Prev();
ASSERT_TRUE(db_iter->Valid());
ASSERT_EQ(db_iter->key().ToString(), "b");
ASSERT_EQ(db_iter->value().ToString(), "b");
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 2);
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 2u);
db_iter->Prev();
ASSERT_TRUE(db_iter->Valid());
ASSERT_EQ(db_iter->key().ToString(), "a");
ASSERT_EQ(db_iter->value().ToString(), "a");
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 3);
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 3u);
db_iter->Prev();
ASSERT_TRUE(!db_iter->Valid());
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 3);
ASSERT_EQ(TestGetTickerCount(options, NUMBER_OF_RESEEKS_IN_ITERATION), 3u);
}
TEST(DBIteratorTest, DBIteratorUseSkip) {

@ -51,14 +51,14 @@ class GenerateFileLevelTest {
TEST(GenerateFileLevelTest, Empty) {
DoGenerateFileLevel(&file_level_, files_, &arena_);
ASSERT_EQ(0, file_level_.num_files);
ASSERT_EQ(0u, file_level_.num_files);
ASSERT_EQ(0, Compare());
}
TEST(GenerateFileLevelTest, Single) {
Add("p", "q");
DoGenerateFileLevel(&file_level_, files_, &arena_);
ASSERT_EQ(1, file_level_.num_files);
ASSERT_EQ(1u, file_level_.num_files);
ASSERT_EQ(0, Compare());
}
@ -69,7 +69,7 @@ TEST(GenerateFileLevelTest, Multiple) {
Add("300", "350");
Add("400", "450");
DoGenerateFileLevel(&file_level_, files_, &arena_);
ASSERT_EQ(4, file_level_.num_files);
ASSERT_EQ(4u, file_level_.num_files);
ASSERT_EQ(0, Compare());
}

@ -26,7 +26,7 @@
namespace rocksdb {
class Block;
class BlockContents;
struct BlockContents;
class BlockHandle;
class Footer;
struct Options;

@ -54,7 +54,7 @@ class JSONDocumentTest {
ASSERT_TRUE(json.Contains("properties"));
ASSERT_TRUE(json["properties"].Contains("flags"));
ASSERT_TRUE(json["properties"]["flags"].IsArray());
ASSERT_EQ(3, json["properties"]["flags"].Count());
ASSERT_EQ(3u, json["properties"]["flags"].Count());
ASSERT_TRUE(json["properties"]["flags"][0].IsInt64());
ASSERT_EQ(10, json["properties"]["flags"][0].GetInt64());
ASSERT_TRUE(json["properties"]["flags"][1].IsString());
@ -74,7 +74,7 @@ class JSONDocumentTest {
ASSERT_EQ(0U, expected.size());
ASSERT_TRUE(json.Contains("latlong"));
ASSERT_TRUE(json["latlong"].IsArray());
ASSERT_EQ(2, json["latlong"].Count());
ASSERT_EQ(2u, json["latlong"].Count());
ASSERT_TRUE(json["latlong"][0].IsDouble());
ASSERT_EQ(53.25, json["latlong"][0].GetDouble());
ASSERT_TRUE(json["latlong"][1].IsDouble());

Loading…
Cancel
Save