Fixed a compile warning in linux32 environment.

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
main
Yueh-Hsuan Chiang 9 years ago
parent 9d6503f88d
commit 90415cfebe
  1. 3
      util/sst_dump_tool.cc

@ -12,6 +12,7 @@
#endif
#include <inttypes.h>
#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;

Loading…
Cancel
Save