diff --git a/test/benchmark_min_time_flag_iters_test.cc b/test/benchmark_min_time_flag_iters_test.cc index eb9414ac..3de93a75 100644 --- a/test/benchmark_min_time_flag_iters_test.cc +++ b/test/benchmark_min_time_flag_iters_test.cc @@ -46,7 +46,7 @@ BENCHMARK(BM_MyBench); int main(int argc, char** argv) { // Make a fake argv and append the new --benchmark_min_time= to it. int fake_argc = argc + 1; - const char** fake_argv = new const char*[fake_argc]; + const char** fake_argv = new const char*[static_cast(fake_argc)]; for (int i = 0; i < argc; ++i) fake_argv[i] = argv[i]; fake_argv[argc] = "--benchmark_min_time=4x"; diff --git a/test/benchmark_min_time_flag_time_test.cc b/test/benchmark_min_time_flag_time_test.cc index b172cccb..04a82eb9 100644 --- a/test/benchmark_min_time_flag_time_test.cc +++ b/test/benchmark_min_time_flag_time_test.cc @@ -71,7 +71,7 @@ BENCHMARK(BM_MyBench); int main(int argc, char** argv) { // Make a fake argv and append the new --benchmark_min_time= to it. int fake_argc = argc + 1; - const char** fake_argv = new const char*[fake_argc]; + const char** fake_argv = new const char*[static_cast(fake_argc)]; for (int i = 0; i < argc; ++i) fake_argv[i] = argv[i]; diff --git a/test/perf_counters_gtest.cc b/test/perf_counters_gtest.cc index e73ebc58..bb55aff7 100644 --- a/test/perf_counters_gtest.cc +++ b/test/perf_counters_gtest.cc @@ -169,8 +169,8 @@ TEST(PerfCountersTest, CreateExistingMeasurements) { std::vector> measurements; // Start all counters together to see if they hold - int max_counters = kMaxCounters; - for (int i = 0; i < kMaxCounters; ++i) { + size_t max_counters = kMaxCounters; + for (size_t i = 0; i < kMaxCounters; ++i) { auto& counter(*perf_counter_measurements[i]); EXPECT_EQ(counter.num_counters(), 1); if (!counter.Start()) { @@ -182,13 +182,13 @@ TEST(PerfCountersTest, CreateExistingMeasurements) { ASSERT_GE(max_counters, kMinValidCounters); // Start all together - for (int i = 0; i < max_counters; ++i) { + for (size_t i = 0; i < max_counters; ++i) { auto& counter(*perf_counter_measurements[i]); EXPECT_TRUE(counter.Stop(measurements) || (i >= kMinValidCounters)); } // Start/stop individually - for (int i = 0; i < max_counters; ++i) { + for (size_t i = 0; i < max_counters; ++i) { auto& counter(*perf_counter_measurements[i]); measurements.clear(); counter.Start();