From db2de74cc8c34131a6f673e35751935cc1897a0d Mon Sep 17 00:00:00 2001 From: Mariusz Wachowicz Date: Fri, 21 May 2021 10:48:20 +0200 Subject: [PATCH] Fix pedantic compilation flag violation (#1156) ';' after method definition was removed. Also, pedantic flag is now uncommented in CMakeList.txt. --- CMakeLists.txt | 5 ++--- src/benchmark.cc | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a0e17c3..53c28932 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,9 +167,8 @@ else() # Disable warning when compiling tests as gtest does not use 'override'. add_cxx_compiler_flag(-Wsuggest-override) endif() - # Disabled until googletest (gmock) stops emitting variadic macro warnings - #add_cxx_compiler_flag(-pedantic) - #add_cxx_compiler_flag(-pedantic-errors) + add_cxx_compiler_flag(-pedantic) + add_cxx_compiler_flag(-pedantic-errors) add_cxx_compiler_flag(-Wshorten-64-to-32) add_cxx_compiler_flag(-fstrict-aliasing) # Disable warnings regarding deprecated parts of the library while building diff --git a/src/benchmark.cc b/src/benchmark.cc index 272794e1..97d657a0 100644 --- a/src/benchmark.cc +++ b/src/benchmark.cc @@ -308,7 +308,7 @@ void FlushStreams(BenchmarkReporter* reporter) { if (!reporter) return; std::flush(reporter->GetOutputStream()); std::flush(reporter->GetErrorStream()); -}; +} // Reports in both display and file reporters. void Report(BenchmarkReporter* display_reporter, @@ -333,7 +333,7 @@ void Report(BenchmarkReporter* display_reporter, FlushStreams(display_reporter); FlushStreams(file_reporter); -}; +} void RunBenchmarks(const std::vector& benchmarks, BenchmarkReporter* display_reporter,