From 81c5d9890020f8207fc65c4509c35064280ad3e9 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Wed, 25 Jun 2014 15:31:30 -0600 Subject: [PATCH] Fixed a comparison between signed and unsigned integers in options.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Fixed the following warning: util/options.cc: In constructor ‘rocksdb::ColumnFamilyOptions::ColumnFamilyOptions(const rocksdb::Options&)’: util/options.cc:157:58: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (max_bytes_for_level_multiplier_additional.size() < num_levels) { ^ Test Plan: make all check Reviewers: haobo, sdong, ljin Reviewed By: ljin Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D19293 --- util/options.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/options.cc b/util/options.cc index 7f1520a74..17dad0f25 100644 --- a/util/options.cc +++ b/util/options.cc @@ -154,7 +154,8 @@ ColumnFamilyOptions::ColumnFamilyOptions(const Options& options) max_successive_merges(options.max_successive_merges), min_partial_merge_operands(options.min_partial_merge_operands) { assert(memtable_factory.get() != nullptr); - if (max_bytes_for_level_multiplier_additional.size() < num_levels) { + if (max_bytes_for_level_multiplier_additional.size() < + static_cast(num_levels)) { max_bytes_for_level_multiplier_additional.resize(num_levels, 1); } }