From e593f6695c6065e6b345fe2862f04a519ed484e0 Mon Sep 17 00:00:00 2001 From: hydai Date: Mon, 23 Sep 2024 20:39:32 +0800 Subject: [PATCH] Fix warning - extra ';' for -Wextra-semi (#3198) Signed-off-by: hydai --- bench/async_bench.cpp | 2 +- bench/bench.cpp | 4 ++-- example/example.cpp | 2 +- include/spdlog/sinks/callback_sink.h | 2 +- include/spdlog/sinks/msvc_sink.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index a136c7bd..dcd24b29 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -160,7 +160,7 @@ void bench_mt(int howmany, std::shared_ptr logger, int thread_co for (auto &t : threads) { t.join(); - }; + } auto delta = high_resolution_clock::now() - start; auto delta_d = duration_cast>(delta).count(); diff --git a/bench/bench.cpp b/bench/bench.cpp index 609f4933..ceb0edf2 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -181,7 +181,7 @@ void bench_mt(int howmany, std::shared_ptr log, size_t thread_co for (auto &t : threads) { t.join(); - }; + } auto delta = high_resolution_clock::now() - start; auto delta_d = duration_cast>(delta).count(); @@ -243,4 +243,4 @@ odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis."; delta_d)); } -*/ \ No newline at end of file +*/ diff --git a/example/example.cpp b/example/example.cpp index de058d27..a2daf372 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -266,7 +266,7 @@ void multi_sink_example() { struct my_type { int i = 0; explicit my_type(int i) - : i(i){}; + : i(i){} }; #ifndef SPDLOG_USE_STD_FORMAT // when using fmtlib diff --git a/include/spdlog/sinks/callback_sink.h b/include/spdlog/sinks/callback_sink.h index 71668ef2..5f8b6bc4 100644 --- a/include/spdlog/sinks/callback_sink.h +++ b/include/spdlog/sinks/callback_sink.h @@ -27,7 +27,7 @@ class callback_sink final : public base_sink { protected: void sink_it_(const details::log_msg &msg) override { callback_(msg); } - void flush_() override{}; + void flush_() override{} private: custom_log_callback callback_; diff --git a/include/spdlog/sinks/msvc_sink.h b/include/spdlog/sinks/msvc_sink.h index 2e5f6875..c28d6ebd 100644 --- a/include/spdlog/sinks/msvc_sink.h +++ b/include/spdlog/sinks/msvc_sink.h @@ -32,7 +32,7 @@ class msvc_sink : public base_sink { public: msvc_sink() = default; msvc_sink(bool check_debugger_present) - : check_debugger_present_{check_debugger_present} {}; + : check_debugger_present_{check_debugger_present} {} protected: void sink_it_(const details::log_msg &msg) override {