From e8c0b30ff2db91c60b26b90054c16b22dca28956 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 1 Mar 2023 23:50:31 +0100 Subject: fix some GCC warnings --- api/plugin-api.cpp | 6 +++--- gui/options-dialog.cpp | 2 +- opentrack/main-window.cpp | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp index 6a43b55d..4d8d90e9 100644 --- a/api/plugin-api.cpp +++ b/api/plugin-api.cpp @@ -21,7 +21,7 @@ void BaseDialog::done(int) bool BaseDialog::embeddable() noexcept { return false; } void BaseDialog::save() {} void BaseDialog::reload() {} -void BaseDialog::set_buttons_visible(bool x) {} +void BaseDialog::set_buttons_visible(bool) {} } // ns plugin_api::detail @@ -36,13 +36,13 @@ IFilter::IFilter() = default; IFilter::~IFilter() = default; IFilterDialog::IFilterDialog() = default; IFilterDialog::~IFilterDialog() = default; -void IFilterDialog::register_filter(IFilter* filter) {} +void IFilterDialog::register_filter(IFilter*) {} void IFilterDialog::unregister_filter() {} IProtocol::IProtocol() = default; IProtocol::~IProtocol() = default; IProtocolDialog::IProtocolDialog() = default; IProtocolDialog::~IProtocolDialog() = default; -void IProtocolDialog::register_protocol(IProtocol* protocol){} +void IProtocolDialog::register_protocol(IProtocol*){} void IProtocolDialog::unregister_protocol() {} ITracker::ITracker() = default; ITracker::~ITracker() = default; diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index ac4117bc..9cd416ee 100644 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -172,7 +172,7 @@ options_dialog::options_dialog(std::unique_ptr& tracker_dialog_, val.label, [=](const QString&) { val.label->setText(kopts_to_string(val.opt)); }); { - connect(val.button, &QPushButton::clicked, this, [=] { bind_key(val.opt, val.label); }); + connect(val.button, &QPushButton::clicked, this, [=, this] { bind_key(val.opt, val.label); }); } } diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp index 59a01e00..f449845b 100644 --- a/opentrack/main-window.cpp +++ b/opentrack/main-window.cpp @@ -683,7 +683,6 @@ static void show_module_settings(std::shared_ptr instance, void(Dialog::*register_fun)(Instance*), void(options_dialog::*switch_tab_fun)()) { - using BaseDialog = plugin_api::detail::BaseDialog; if (!lib || !lib->Dialog) return; -- cgit v1.2.3