diff --git a/include/dpp/collector.h b/include/dpp/collector.h index dbc8caf823..4e388971c4 100644 --- a/include/dpp/collector.h +++ b/include/dpp/collector.h @@ -81,7 +81,7 @@ template class collector stored.push_back(*v); } }; - tl = new dpp::timed_listener, std::function>(cl, duration, event, f, [this](dpp::timer timer_handle) { + tl = new dpp::timed_listener, std::function>(cl, duration, event, f, [this]([[maybe_unused]] dpp::timer timer_handle) { if (!triggered) { triggered = true; completed(stored); diff --git a/include/dpp/json_interface.h b/include/dpp/json_interface.h index 56d1c3e64a..430a1522a4 100644 --- a/include/dpp/json_interface.h +++ b/include/dpp/json_interface.h @@ -44,7 +44,7 @@ namespace dpp { * @param j nlohmann::json object * @return T& Reference to self for fluent calling */ - T& fill_from_json(nlohmann::json* j) { + T& fill_from_json([[maybe_unused]] nlohmann::json* j) { throw dpp::logic_exception("JSON interface doesn't implement parse_from_json"); } @@ -54,7 +54,7 @@ namespace dpp { * @param with_id Include the ID in the JSON * @return std::string JSON string version of object */ - virtual std::string build_json(bool with_id = false) const { + virtual std::string build_json([[maybe_unused]] bool with_id = false) const { throw dpp::logic_exception("JSON interface doesn't implement build_json"); } }; diff --git a/include/dpp/timed_listener.h b/include/dpp/timed_listener.h index 0ec9a4d7ea..d9031847a5 100644 --- a/include/dpp/timed_listener.h +++ b/include/dpp/timed_listener.h @@ -73,7 +73,7 @@ template class timed_listene /* Attach event */ listener_handle = ev(listener); /* Create timer */ - th = cl->start_timer([this](dpp::timer timer_handle) { + th = cl->start_timer([this]([[maybe_unused]] dpp::timer timer_handle) { /* Timer has finished, detach it from event. * Only allowed to tick once. */