From e4d81a5be96cde8fd855ad31540ce414c86aecec Mon Sep 17 00:00:00 2001 From: hydai Date: Mon, 23 Sep 2024 15:39:32 +0300 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 05cbe652..60de0386 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -146,7 +146,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 6538d7ef..8781e647 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -144,7 +144,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(); @@ -205,4 +205,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 a682cf99..9dbb1c7c 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -252,7 +252,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 4c4be1c7..3aa89dee 100644 --- a/include/spdlog/sinks/callback_sink.h +++ b/include/spdlog/sinks/callback_sink.h @@ -27,7 +27,7 @@ public: 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 3a9e58bc..4b1535c0 100644 --- a/include/spdlog/sinks/msvc_sink.h +++ b/include/spdlog/sinks/msvc_sink.h @@ -22,7 +22,7 @@ class msvc_sink final : 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 {