Skip to content

Commit db2de74

Browse files
authored
Fix pedantic compilation flag violation (google#1156)
';' after method definition was removed. Also, pedantic flag is now uncommented in CMakeList.txt.
1 parent a4bcd93 commit db2de74

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,8 @@ else()
167167
# Disable warning when compiling tests as gtest does not use 'override'.
168168
add_cxx_compiler_flag(-Wsuggest-override)
169169
endif()
170-
# Disabled until googletest (gmock) stops emitting variadic macro warnings
171-
#add_cxx_compiler_flag(-pedantic)
172-
#add_cxx_compiler_flag(-pedantic-errors)
170+
add_cxx_compiler_flag(-pedantic)
171+
add_cxx_compiler_flag(-pedantic-errors)
173172
add_cxx_compiler_flag(-Wshorten-64-to-32)
174173
add_cxx_compiler_flag(-fstrict-aliasing)
175174
# Disable warnings regarding deprecated parts of the library while building

src/benchmark.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void FlushStreams(BenchmarkReporter* reporter) {
308308
if (!reporter) return;
309309
std::flush(reporter->GetOutputStream());
310310
std::flush(reporter->GetErrorStream());
311-
};
311+
}
312312

313313
// Reports in both display and file reporters.
314314
void Report(BenchmarkReporter* display_reporter,
@@ -333,7 +333,7 @@ void Report(BenchmarkReporter* display_reporter,
333333

334334
FlushStreams(display_reporter);
335335
FlushStreams(file_reporter);
336-
};
336+
}
337337

338338
void RunBenchmarks(const std::vector<BenchmarkInstance>& benchmarks,
339339
BenchmarkReporter* display_reporter,

0 commit comments

Comments
 (0)