From 5c6ef56152f8dc0fe9631332c5e8aa8b20bfbd5e Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 3 Feb 2014 10:21:58 -0800 Subject: [PATCH] Fix printf format --- db/compaction_picker.cc | 2 +- db/db_bench.cc | 4 ++-- util/options.cc | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/db/compaction_picker.cc b/db/compaction_picker.cc index 9582b6a29..28cda9dac 100644 --- a/db/compaction_picker.cc +++ b/db/compaction_picker.cc @@ -551,7 +551,7 @@ Compaction* UniversalCompactionPicker::PickCompaction(Version* version) { return nullptr; } Version::FileSummaryStorage tmp; - Log(options_->info_log, "Universal: candidate files(%lu): %s\n", + Log(options_->info_log, "Universal: candidate files(%zu): %s\n", version->files_[level].size(), version->LevelFileSummary(&tmp, 0)); diff --git a/db/db_bench.cc b/db/db_bench.cc index 18258fbb6..9e6ef70ca 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -1526,14 +1526,14 @@ class Benchmark { ++count; char* tab = std::find(linep, linep + bufferLen, columnSeparator); if (tab == linep + bufferLen) { - fprintf(stderr, "[Error] No Key delimiter TAB at line %ld\n", count); + fprintf(stderr, "[Error] No Key delimiter TAB at line %zu\n", count); continue; } Slice key(linep, tab - linep); tab++; char* endLine = std::find(tab, linep + bufferLen, lineSeparator); if (endLine == linep + bufferLen) { - fprintf(stderr, "[Error] No ENTER at end of line # %ld\n", count); + fprintf(stderr, "[Error] No ENTER at end of line # %zu\n", count); continue; } Slice value(tab, endLine - tab); diff --git a/util/options.cc b/util/options.cc index 671f3d681..97fffdb18 100644 --- a/util/options.cc +++ b/util/options.cc @@ -164,11 +164,11 @@ Options::Dump(Logger* log) const Log(log," Options.num_levels: %d", num_levels); Log(log," Options.disableDataSync: %d", disableDataSync); Log(log," Options.use_fsync: %d", use_fsync); - Log(log," Options.max_log_file_size: %ld", max_log_file_size); + Log(log," Options.max_log_file_size: %zu", max_log_file_size); Log(log,"Options.max_manifest_file_size: %lu", (unsigned long)max_manifest_file_size); - Log(log," Options.log_file_time_to_roll: %ld", log_file_time_to_roll); - Log(log," Options.keep_log_file_num: %ld", keep_log_file_num); + Log(log," Options.log_file_time_to_roll: %zu", log_file_time_to_roll); + Log(log," Options.keep_log_file_num: %zu", keep_log_file_num); Log(log," Options.db_stats_log_interval: %d", db_stats_log_interval); Log(log," Options.allow_os_buffer: %d", allow_os_buffer); @@ -224,7 +224,7 @@ Options::Dump(Logger* log) const table_cache_numshardbits); Log(log," Options.table_cache_remove_scan_count_limit: %d", table_cache_remove_scan_count_limit); - Log(log," Options.arena_block_size: %ld", + Log(log," Options.arena_block_size: %zu", arena_block_size); Log(log," Options.delete_obsolete_files_period_micros: %lu", (unsigned long)delete_obsolete_files_period_micros); @@ -244,7 +244,7 @@ Options::Dump(Logger* log) const (unsigned long)WAL_ttl_seconds); Log(log," Options.WAL_size_limit_MB: %lu", (unsigned long)WAL_size_limit_MB); - Log(log," Options.manifest_preallocation_size: %ld", + Log(log," Options.manifest_preallocation_size: %zu", manifest_preallocation_size); Log(log," Options.purge_redundant_kvs_while_flush: %d", purge_redundant_kvs_while_flush);