From f76eda74d6f6e0f527eb93abacbc4ca5c0aba2ea Mon Sep 17 00:00:00 2001 From: Shao Yu Zhang Date: Thu, 21 Aug 2014 18:11:33 -0700 Subject: [PATCH] Fix compilation issue on OSX --- table/cuckoo_table_reader_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/table/cuckoo_table_reader_test.cc b/table/cuckoo_table_reader_test.cc index 8315b1bd2..9f42ade8c 100644 --- a/table/cuckoo_table_reader_test.cc +++ b/table/cuckoo_table_reader_test.cc @@ -362,7 +362,7 @@ void GetKeys(uint64_t num, std::vector* keys) { IterKey k; k.SetInternalKey("", 0, kTypeValue); std::string internal_key_suffix = k.GetKey().ToString(); - ASSERT_EQ(8, internal_key_suffix.size()); + ASSERT_EQ(static_cast(8), internal_key_suffix.size()); for (uint64_t key_idx = 0; key_idx < num; ++key_idx) { std::string new_key(reinterpret_cast(&key_idx), sizeof(key_idx)); new_key += internal_key_suffix; @@ -418,7 +418,7 @@ void WriteFile(const std::vector& keys, int cnt = 0; ASSERT_OK(reader.Get(r_options, Slice(key), &cnt, CheckValue, nullptr)); if (cnt != 1) { - fprintf(stderr, "%lu not found.\n", + fprintf(stderr, "%" PRIx64 " not found.\n", *reinterpret_cast(key.data())); ASSERT_EQ(1, cnt); }