From e9ca3581579c03799856edad5b4413ad430f8263 Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 30 Dec 2014 18:33:35 -0800 Subject: [PATCH] Fix CLANG build for db_bench Summary: CLANG was broken for a recent change in db_ench. Fix it. Test Plan: Build db_bench using CLANG. Reviewers: rven, igor, yhchiang Reviewed By: yhchiang Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D30801 --- db/db_bench.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_bench.cc b/db/db_bench.cc index 5e4bbd9d1..3fc17d7b7 100644 --- a/db/db_bench.cc +++ b/db/db_bench.cc @@ -398,12 +398,12 @@ enum rocksdb::CompressionType StringToCompressionType(const char* ctype) { return rocksdb::kSnappyCompression; //default value } -std::string ColumnFamilyName(int i) { +std::string ColumnFamilyName(size_t i) { if (i == 0) { return rocksdb::kDefaultColumnFamilyName; } else { char name[100]; - snprintf(name, sizeof(name), "column_family_name_%06d", i); + snprintf(name, sizeof(name), "column_family_name_%06zu", i); return std::string(name); } }