Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495)

This commit is contained in:
Louis Dionne 2017-12-03 17:45:07 -08:00 committed by Eric
parent 0bbaeeaf7a
commit 5b2c08668c
9 changed files with 10 additions and 9 deletions

View File

@ -1146,7 +1146,8 @@ class Fixture : public internal::Benchmark {
::benchmark::Initialize(&argc, argv); \
if (::benchmark::ReportUnrecognizedArguments(argc, argv)) return 1; \
::benchmark::RunSpecifiedBenchmarks(); \
}
} \
int main(int, char**)
// ------------------------------------------------------

View File

@ -115,4 +115,4 @@ void BM_RangedFor(benchmark::State& state) {
}
BENCHMARK(BM_RangedFor);
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -241,4 +241,4 @@ BENCHMARK(BM_DenseThreadRanges)->Arg(1)->DenseThreadRange(1, 3);
BENCHMARK(BM_DenseThreadRanges)->Arg(2)->DenseThreadRange(1, 4, 2);
BENCHMARK(BM_DenseThreadRanges)->Arg(3)->DenseThreadRange(5, 14, 3);
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -60,4 +60,4 @@ void BM_counters(benchmark::State& state) {
}
BENCHMARK(BM_counters);
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -46,4 +46,4 @@ BENCHMARK_DEFINE_F(MyFixture, Bar)(benchmark::State& st) {
BENCHMARK_REGISTER_F(MyFixture, Bar)->Arg(42);
BENCHMARK_REGISTER_F(MyFixture, Bar)->Arg(42)->ThreadPerCpu();
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -54,4 +54,4 @@ BENCHMARK_DEFINE_F(MapFixture, Lookup)(benchmark::State& state) {
}
BENCHMARK_REGISTER_F(MapFixture, Lookup)->Range(1 << 3, 1 << 12);
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -71,4 +71,4 @@ static void BM_MultipleRanges(benchmark::State& st) {
}
BENCHMARK(BM_MultipleRanges)->Ranges({{5, 5}, {6, 6}});
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -62,4 +62,4 @@ void BM_explicit_iteration_count(benchmark::State& state) {
}
BENCHMARK(BM_explicit_iteration_count)->Iterations(42);
BENCHMARK_MAIN()
BENCHMARK_MAIN();

View File

@ -25,4 +25,4 @@ BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark::State& st) {
}
BENCHMARK_REGISTER_F(MyFixture, Bar);
BENCHMARK_MAIN()
BENCHMARK_MAIN();