aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2014-06-12 14:52:58 -0500
committerElliott Hughes2014-06-12 14:52:58 -0500
commit5ab51d0d1af455afb22621dc3b75079d2b274929 (patch)
tree419648e8a9d55415bd9ac4ec769c7bc7876d2346 /benchmarks
parentd242aff47dc4eaa5081dc7af821308d353cd1090 (diff)
downloadplatform-bionic-5ab51d0d1af455afb22621dc3b75079d2b274929.tar.gz
platform-bionic-5ab51d0d1af455afb22621dc3b75079d2b274929.tar.xz
platform-bionic-5ab51d0d1af455afb22621dc3b75079d2b274929.zip
Fix GCC 4.9 complaint about int/size_t mismatch.
Change-Id: Ib13857f98658dc8760cff15adb5829e8e140008a
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmark_main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/benchmarks/benchmark_main.cpp b/benchmarks/benchmark_main.cpp
index cd809688..d60670b9 100644
--- a/benchmarks/benchmark_main.cpp
+++ b/benchmarks/benchmark_main.cpp
@@ -32,7 +32,7 @@ static int64_t g_benchmark_start_time_ns;
32typedef std::map<std::string, ::testing::Benchmark*> BenchmarkMap; 32typedef std::map<std::string, ::testing::Benchmark*> BenchmarkMap;
33typedef BenchmarkMap::iterator BenchmarkMapIt; 33typedef BenchmarkMap::iterator BenchmarkMapIt;
34static BenchmarkMap g_benchmarks; 34static BenchmarkMap g_benchmarks;
35static size_t g_name_column_width = 20; 35static int g_name_column_width = 20;
36 36
37static int Round(int n) { 37static int Round(int n) {
38 int base = 1; 38 int base = 1;
@@ -196,7 +196,8 @@ int main(int argc, char* argv[]) {
196 } 196 }
197 197
198 for (BenchmarkMapIt it = g_benchmarks.begin(); it != g_benchmarks.end(); ++it) { 198 for (BenchmarkMapIt it = g_benchmarks.begin(); it != g_benchmarks.end(); ++it) {
199 g_name_column_width = std::max(g_name_column_width, strlen(it->second->Name())); 199 int name_width = static_cast<int>(strlen(it->second->Name()));
200 g_name_column_width = std::max(g_name_column_width, name_width);
200 } 201 }
201 202
202 bool need_header = true; 203 bool need_header = true;