diff --git a/src/lib/base/LogOutputters.cpp b/src/lib/base/LogOutputters.cpp index 9ef563785..4261d6eaa 100644 --- a/src/lib/base/LogOutputters.cpp +++ b/src/lib/base/LogOutputters.cpp @@ -141,7 +141,7 @@ void FileLogOutputter::setLogFilename(const QString &logFile) m_fileName = logFile; } -bool FileLogOutputter::write(LogLevel level, const QString &message) +bool FileLogOutputter::write(LogLevel, const QString &message) { QFile file(m_fileName); if (!file.open(QFile::WriteOnly | QFile::Append)) diff --git a/src/lib/deskflow/ClientApp.h b/src/lib/deskflow/ClientApp.h index 31bfe4872..286e5dc62 100644 --- a/src/lib/deskflow/ClientApp.h +++ b/src/lib/deskflow/ClientApp.h @@ -38,7 +38,7 @@ public: { // do nothing } - bool loadConfig(const std::string &pathname) override + bool loadConfig(const std::string &) override { return false; } diff --git a/src/lib/deskflow/IPlatformScreen.cpp b/src/lib/deskflow/IPlatformScreen.cpp index 839647b69..7afb31b6d 100644 --- a/src/lib/deskflow/IPlatformScreen.cpp +++ b/src/lib/deskflow/IPlatformScreen.cpp @@ -6,7 +6,7 @@ #include "deskflow/IPlatformScreen.h" -bool IPlatformScreen::fakeMediaKey(KeyID id) +bool IPlatformScreen::fakeMediaKey(KeyID) { return false; } diff --git a/src/lib/deskflow/IPlatformScreen.h b/src/lib/deskflow/IPlatformScreen.h index f82c6326a..c8a3cbda9 100644 --- a/src/lib/deskflow/IPlatformScreen.h +++ b/src/lib/deskflow/IPlatformScreen.h @@ -181,7 +181,7 @@ public: bool fakeKeyUp(KeyButton button) override = 0; void fakeAllKeysUp() override = 0; bool fakeCtrlAltDel() override = 0; - bool fakeMediaKey(KeyID id) override; + bool fakeMediaKey(KeyID) override; bool isKeyDown(KeyButton) const override = 0; KeyModifierMask getActiveModifiers() const override = 0; KeyModifierMask pollActiveModifiers() const override = 0; diff --git a/src/lib/deskflow/KeyState.cpp b/src/lib/deskflow/KeyState.cpp index 69d1fe7d3..0c12ef145 100644 --- a/src/lib/deskflow/KeyState.cpp +++ b/src/lib/deskflow/KeyState.cpp @@ -954,7 +954,7 @@ void KeyState::fakeAllKeysUp() m_mask = pollActiveModifiers(); } -bool KeyState::fakeMediaKey(KeyID id) +bool KeyState::fakeMediaKey(KeyID) { return false; } diff --git a/src/lib/gui/dialogs/ServerConfigDialog.cpp b/src/lib/gui/dialogs/ServerConfigDialog.cpp index 524e6ba1b..fbe4b60e7 100644 --- a/src/lib/gui/dialogs/ServerConfigDialog.cpp +++ b/src/lib/gui/dialogs/ServerConfigDialog.cpp @@ -244,7 +244,7 @@ void ServerConfigDialog::removeHotkey() onChange(); } -void ServerConfigDialog::listHotkeysSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) +void ServerConfigDialog::listHotkeysSelectionChanged(const QItemSelection &selected, const QItemSelection &) { bool itemsSelected = !selected.isEmpty(); ui->btnEditHotkey->setEnabled(itemsSelected); @@ -393,7 +393,7 @@ void ServerConfigDialog::toggleCornerTopRight(bool enable) onChange(); } -void ServerConfigDialog::listActionsSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) +void ServerConfigDialog::listActionsSelectionChanged(const QItemSelection &selected, const QItemSelection &) { bool enabled = !selected.isEmpty(); ui->btnEditAction->setEnabled(enabled); diff --git a/src/lib/gui/validators/LineEditValidator.cpp b/src/lib/gui/validators/LineEditValidator.cpp index c0c9e5696..a0edbf924 100644 --- a/src/lib/gui/validators/LineEditValidator.cpp +++ b/src/lib/gui/validators/LineEditValidator.cpp @@ -29,7 +29,7 @@ void LineEditValidator::addValidator(std::unique_ptr validator m_Validators.push_back(std::move(validator)); } -QValidator::State LineEditValidator::validate(QString &input, int &pos) const +QValidator::State LineEditValidator::validate(QString &input, int &) const { assert(m_pLineEdit); diff --git a/src/lib/platform/EiEventQueueBuffer.cpp b/src/lib/platform/EiEventQueueBuffer.cpp index dc1629b9a..a6b85fe3c 100644 --- a/src/lib/platform/EiEventQueueBuffer.cpp +++ b/src/lib/platform/EiEventQueueBuffer.cpp @@ -137,7 +137,7 @@ bool EiEventQueueBuffer::isEmpty() const return m_queue.empty(); } -EventQueueTimer *EiEventQueueBuffer::newTimer(double duration, bool oneShot) const +EventQueueTimer *EiEventQueueBuffer::newTimer(double, bool) const { return new EventQueueTimer; } diff --git a/src/lib/platform/EiKeyState.cpp b/src/lib/platform/EiKeyState.cpp index 4bc2f64fc..6f98451a1 100644 --- a/src/lib/platform/EiKeyState.cpp +++ b/src/lib/platform/EiKeyState.cpp @@ -106,7 +106,7 @@ std::int32_t EiKeyState::pollActiveGroup() const return xkb_state_serialize_layout(m_xkbState, XKB_STATE_LAYOUT_EFFECTIVE); } -void EiKeyState::pollPressedKeys(KeyButtonSet &pressedKeys) const +void EiKeyState::pollPressedKeys(KeyButtonSet &) const { // FIXME return; diff --git a/src/lib/platform/EiScreen.cpp b/src/lib/platform/EiScreen.cpp index 54c1e24fd..cd168d8ee 100644 --- a/src/lib/platform/EiScreen.cpp +++ b/src/lib/platform/EiScreen.cpp @@ -165,7 +165,7 @@ void *EiScreen::getEventTarget() const return const_cast(static_cast(this)); } -bool EiScreen::getClipboard(ClipboardID id, IClipboard *clipboard) const +bool EiScreen::getClipboard(ClipboardID, IClipboard *) const { return false; } @@ -244,7 +244,7 @@ std::int32_t EiScreen::getJumpZoneSize() const return 1; } -bool EiScreen::isAnyMouseButtonDown(uint32_t &buttonID) const +bool EiScreen::isAnyMouseButtonDown(uint32_t &) const { return false; } @@ -385,7 +385,7 @@ void EiScreen::leave() m_isOnScreen = false; } -bool EiScreen::setClipboard(ClipboardID id, const IClipboard *clipboard) +bool EiScreen::setClipboard(ClipboardID, const IClipboard *) { return false; } @@ -731,7 +731,7 @@ void EiScreen::handlePortalSessionClosed() initEi(); } -void EiScreen::handleSystemEvent(const Event &sysevent) +void EiScreen::handleSystemEvent(const Event &) { std::scoped_lock lock{m_mutex}; diff --git a/src/lib/platform/XWindowsScreen.cpp b/src/lib/platform/XWindowsScreen.cpp index 0694c8f68..9d0dddf02 100644 --- a/src/lib/platform/XWindowsScreen.cpp +++ b/src/lib/platform/XWindowsScreen.cpp @@ -740,7 +740,7 @@ int32_t XWindowsScreen::getJumpZoneSize() const return 1; } -bool XWindowsScreen::isAnyMouseButtonDown(uint32_t &buttonID) const +bool XWindowsScreen::isAnyMouseButtonDown(uint32_t &) const { // query the pointer to get the button state Window root; diff --git a/src/lib/server/ClientProxy1_0.cpp b/src/lib/server/ClientProxy1_0.cpp index 904c0361f..a59056055 100644 --- a/src/lib/server/ClientProxy1_0.cpp +++ b/src/lib/server/ClientProxy1_0.cpp @@ -305,13 +305,13 @@ void ClientProxy1_0::mouseWheel(int32_t, int32_t yDelta) ProtocolUtil::writef(getStream(), kMsgDMouseWheel1_0, yDelta); } -void ClientProxy1_0::sendDragInfo(uint32_t fileCount, const char *info, size_t size) +void ClientProxy1_0::sendDragInfo(uint32_t, const char *, size_t) { // ignore -- not supported in protocol 1.0 LOG_DEBUG("draggingInfoSending not supported"); } -void ClientProxy1_0::fileChunkSending(uint8_t mark, char *data, size_t dataSize) +void ClientProxy1_0::fileChunkSending(uint8_t, char *, size_t) { // ignore -- not supported in protocol 1.0 LOG_DEBUG("fileChunkSending not supported"); @@ -324,7 +324,7 @@ std::string ClientProxy1_0::getSecureInputApp() const return ""; } -void ClientProxy1_0::secureInputNotification(const std::string &app) const +void ClientProxy1_0::secureInputNotification(const std::string &) const { // ignore -- not supported in protocol 1.0 LOG_DEBUG("secureInputNotification not supported"); diff --git a/src/lib/server/InputFilter.cpp b/src/lib/server/InputFilter.cpp index fce79756d..1fe98f32f 100644 --- a/src/lib/server/InputFilter.cpp +++ b/src/lib/server/InputFilter.cpp @@ -259,7 +259,7 @@ std::string InputFilter::RestartServer::format() const return deskflow::string::sprintf("restartServer(%s)", s_mode[m_mode]); } -void InputFilter::RestartServer::perform(const Event &event) +void InputFilter::RestartServer::perform(const Event &) { // HACK Super hack we should gracefully exit exit(0); diff --git a/src/unittests/legacytests/legacytests/deskflow/KeyStateTests.cpp b/src/unittests/legacytests/legacytests/deskflow/KeyStateTests.cpp index 48b8fe229..eb1e72379 100644 --- a/src/unittests/legacytests/legacytests/deskflow/KeyStateTests.cpp +++ b/src/unittests/legacytests/legacytests/deskflow/KeyStateTests.cpp @@ -16,12 +16,10 @@ using ::testing::_; using ::testing::Invoke; using ::testing::NiceMock; using ::testing::Return; -using ::testing::ReturnRef; -using ::testing::SaveArg; void stubPollPressedKeys(IKeyState::KeyButtonSet &pressedKeys); -void assertMaskIsOne(ForeachKeyCallback cb, void *userData); +void assertMaskIsOne(ForeachKeyCallback, void *userData); const deskflow::KeyMap::KeyItem *stubMapKey( deskflow::KeyMap::Keystrokes &keys, KeyID id, int32_t group, deskflow::KeyMap::ModifierToKeys &activeModifiers, @@ -406,7 +404,7 @@ void stubPollPressedKeys(IKeyState::KeyButtonSet &pressedKeys) pressedKeys.insert(1); } -void assertMaskIsOne(ForeachKeyCallback cb, void *userData) +void assertMaskIsOne(ForeachKeyCallback, void *userData) { ASSERT_EQ(1, ((KeyState::AddActiveModifierContext *)userData)->m_mask); } diff --git a/src/unittests/net/SecureUtilsTests.cpp b/src/unittests/net/SecureUtilsTests.cpp index bc5ad413e..c55420166 100644 --- a/src/unittests/net/SecureUtilsTests.cpp +++ b/src/unittests/net/SecureUtilsTests.cpp @@ -13,7 +13,7 @@ using namespace deskflow; void SecureUtilsTests::checkHex() { - QByteArray fingerprint( + const QByteArray fingerprint( "\x28\xFD\x0A\x98\x8A\x0E\xA1\x6C\xD7\xE8\x6C\xA7\xEE\x58\x41\x71\xCA\xB2\x8E\x49\x25\x94\x90\x25\x26\x05\x8D\xAF" "\x63\xED\x2E\x30", 32 @@ -26,7 +26,7 @@ void SecureUtilsTests::checkHex() void SecureUtilsTests::checkArt() { - QByteArray fingerprint( + const QByteArray fingerprint( "\x28\xFD\x0A\x98\x8A\x0E\xA1\x6C\xD7\xE8\x6C\xA7\xEE\x58\x41\x71\xCA\xB2\x8E\x49\x25\x94\x90\x25\x26\x05\x8D\xAF" "\x63\xED\x2E\x30", 32