From ffdcf89f7cd9c09da79337803afdd36a40434920 Mon Sep 17 00:00:00 2001 From: srcejon Date: Tue, 8 Oct 2024 20:55:31 +0100 Subject: [PATCH] Fix lint warnings --- plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp | 6 +++--- .../remotetcpsink/remotetcpsinksettingsdialog.h | 2 +- sdrbase/channel/channelwebapiutils.cpp | 9 +++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp index c8f3af621..c06274098 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp +++ b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp @@ -246,7 +246,7 @@ bool RemoteTCPSinkGUI::handleMessage(const Message& message) } else if (DSPSignalNotification::match(message)) { - DSPSignalNotification& cfg = (DSPSignalNotification&) message; + const DSPSignalNotification& cfg = (const DSPSignalNotification&) message; if (cfg.getSampleRate() != m_basebandSampleRate) { m_bwAvg.reset(); } @@ -260,7 +260,7 @@ bool RemoteTCPSinkGUI::handleMessage(const Message& message) } else if (RemoteTCPSink::MsgSendMessage::match(message)) { - RemoteTCPSink::MsgSendMessage& msg = (RemoteTCPSink::MsgSendMessage&) message; + const RemoteTCPSink::MsgSendMessage& msg = (const RemoteTCPSink::MsgSendMessage&) message; QString address = QString("%1:%2").arg(msg.getAddress().toString()).arg(msg.getPort()); QString callsign = msg.getCallsign(); QString text = msg.getText(); @@ -279,7 +279,7 @@ bool RemoteTCPSinkGUI::handleMessage(const Message& message) } else if (RemoteTCPSink::MsgError::match(message)) { - RemoteTCPSink::MsgError& msg = (RemoteTCPSink::MsgError&) message; + const RemoteTCPSink::MsgError& msg = (const RemoteTCPSink::MsgError&) message; QString error = msg.getError(); QMessageBox::warning(this, "RemoteTCPSink", error, QMessageBox::Ok); return true; diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinksettingsdialog.h b/plugins/channelrx/remotetcpsink/remotetcpsinksettingsdialog.h index c136abf23..8942351c4 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinksettingsdialog.h +++ b/plugins/channelrx/remotetcpsink/remotetcpsinksettingsdialog.h @@ -37,7 +37,7 @@ public: const QStringList& getSettingsKeys() const { return m_settingsKeys; }; private slots: - void accept(); + void accept() override; void on_browseCertificate_clicked(); void on_browseKey_clicked(); void on_addIP_clicked(); diff --git a/sdrbase/channel/channelwebapiutils.cpp b/sdrbase/channel/channelwebapiutils.cpp index 27e489c66..6a26b9018 100644 --- a/sdrbase/channel/channelwebapiutils.cpp +++ b/sdrbase/channel/channelwebapiutils.cpp @@ -2016,7 +2016,6 @@ bool DeviceOpener::open(const QString hwType, int direction, const QStringList& } int nbSamplingDevices = DeviceEnumerator::instance()->getNbRxSamplingDevices(); - bool found = false; for (int i = 0; i < nbSamplingDevices; i++) { @@ -2032,9 +2031,7 @@ bool DeviceOpener::open(const QString hwType, int direction, const QStringList& return true; } - if (!found) - { - qCritical() << "DeviceOpener::open: Failed to find device with hwType " << hwType; - return false; - } + + qWarning() << "DeviceOpener::open: Failed to find device with hwType " << hwType; + return false; }