From f959e88048642f3548065d07306ad7a0ffdeaa7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Gra=CC=88tzer?= Date: Fri, 19 Oct 2018 14:43:55 -0700 Subject: [PATCH] Fix printf formatting on MacOS (#4533) Summary: On MacOS with clang the compilation of _tools/db_bench_tool.cc_ always fails because the format used in a `fprintf` call has the wrong type. This PR should hopefully fix this issue ``` tools/db_bench_tool.cc:4233:61: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/4533 Differential Revision: D10471657 Pulled By: maysamyabandeh fbshipit-source-id: f20f5f3756d3571b586c895c845d0d4d1e34a398 --- .travis.yml | 2 +- tools/db_bench_tool.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b366da251..e759a642a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,7 +90,7 @@ script: OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=full_filter_block_test make -j4 check_some ;; 2) - OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=full_filter_block_test ROCKSDBTESTS_END=write_batch_with_index_test make -j4 check_some + OPT=-DTRAVIS V=1 make -j4 tools && OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=full_filter_block_test ROCKSDBTESTS_END=write_batch_with_index_test make -j4 check_some ;; 3) OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=write_batch_with_index_test ROCKSDBTESTS_END=write_prepared_transaction_test make -j4 check_some diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 1a68ad654..a416b91ab 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -4237,7 +4237,7 @@ void VerifyDBFromDB(std::string& truth_db_name) { } if (levelMeta.level == 0) { for (auto& fileMeta : levelMeta.files) { - fprintf(stdout, "Level[%d]: %s(size: %" PRIu64 " bytes)\n", + fprintf(stdout, "Level[%d]: %s(size: %" ROCKSDB_PRIszt " bytes)\n", levelMeta.level, fileMeta.name.c_str(), fileMeta.size); } } else {