From 90415cfebe90bda845b9ee3e5a00e86d4f80e02e Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Mon, 31 Aug 2015 18:35:12 -0700 Subject: [PATCH] Fixed a compile warning in linux32 environment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Fixed the following compile warning in linux32 environment. ==> linux32: util/sst_dump_tool.cc: In member function ‘int rocksdb::SstFileReader::ShowAllCompressionSizes(size_t)’: ==> linux32: util/sst_dump_tool.cc:167:50: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t {aka unsigned int}’ [-Wformat=] ==> linux32: fprintf(stdout, "Block Size: %lu\n", block_size); Test Plan: make sst_dump Reviewers: anthony, IslamAbdelRahman, sdong, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D45885 --- util/sst_dump_tool.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/sst_dump_tool.cc b/util/sst_dump_tool.cc index af7ea5977..bd074ea23 100644 --- a/util/sst_dump_tool.cc +++ b/util/sst_dump_tool.cc @@ -12,6 +12,7 @@ #endif #include +#include "port/port.h" namespace rocksdb { @@ -166,7 +167,7 @@ int SstFileReader::ShowAllCompressionSizes(size_t block_size) { compress_type.insert(std::make_pair(CompressionType::kZSTDNotFinalCompression, "kZSTDNotFinalCompression")); - fprintf(stdout, "Block Size: %lu\n", block_size); + fprintf(stdout, "Block Size: %" ROCKSDB_PRIszt "\n", block_size); for (CompressionType i = CompressionType::kNoCompression; i <= CompressionType::kZSTDNotFinalCompression;