From 903ddf78418e3e08cbd78a27d8d2866bef886325 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Mon, 7 Apr 2014 15:47:12 +0100 Subject: [PATCH] fixed compiler warnings detected by jenkins build server --- samples/blackgui/mainwindow_init.cpp | 1 + src/blacksound/soundgenerator.cpp | 3 ++- tests/blackcore/expect.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/blackgui/mainwindow_init.cpp b/samples/blackgui/mainwindow_init.cpp index 6e687153b..4438581c8 100644 --- a/samples/blackgui/mainwindow_init.cpp +++ b/samples/blackgui/mainwindow_init.cpp @@ -221,6 +221,7 @@ void MainWindow::init(GuiModes::CoreMode coreMode) this->connect(this->m_contextSettings, &IContextSettings::changedSettings, this, &MainWindow::changedSettings); connect = this->connect(this->m_contextNetwork, SIGNAL(textMessagesReceived(BlackMisc::Network::CTextMessageList)), this, SLOT(appendTextMessagesToGui(BlackMisc::Network::CTextMessageList))); Q_ASSERT(connect); + Q_UNUSED(connect); // suppress GCC warning in release build this->connect(this->m_contextSimulator, &IContextSimulator::connectionChanged, this, &MainWindow::simulatorAvailable); this->connect(this->m_timerUpdateAircraftsInRange, &QTimer::timeout, this, &MainWindow::timerBasedUpdates); this->connect(this->m_timerUpdateAtcStationsOnline, &QTimer::timeout, this, &MainWindow::timerBasedUpdates); diff --git a/src/blacksound/soundgenerator.cpp b/src/blacksound/soundgenerator.cpp index 11b9ad829..ba260872b 100644 --- a/src/blacksound/soundgenerator.cpp +++ b/src/blacksound/soundgenerator.cpp @@ -67,6 +67,7 @@ namespace BlackSound this->m_pushTimer = new QTimer(this); bool connect = this->connect(this->m_pushTimer, &QTimer::timeout, this, &CSoundGenerator::pushTimerExpired); Q_ASSERT(connect); + Q_UNUSED(connect); // suppress Clang warning in release build this->m_pushTimer->start(20); } this->m_pushModeIODevice = this->m_audioOutput->start(); // push, IO device not owned @@ -256,7 +257,7 @@ namespace BlackSound if (!success) return false; CombinedHeader header; - size_t headerLength = sizeof(CombinedHeader); + qint64 headerLength = sizeof(CombinedHeader); memset(&header, 0, headerLength); // RIFF header diff --git a/tests/blackcore/expect.h b/tests/blackcore/expect.h index 81bef25ce..c1402f866 100644 --- a/tests/blackcore/expect.h +++ b/tests/blackcore/expect.h @@ -49,7 +49,7 @@ public: //! Copying is only allowed when there are no connections stored. //! @{ ConnectGuard(const ConnectGuard& other) { Q_ASSERT(other.m_conns.isEmpty()); Q_UNUSED(other); } - ConnectGuard& operator= (const ConnectGuard& other) { Q_ASSERT(other.m_conns.isEmpty()); Q_UNUSED(other); } + ConnectGuard& operator= (const ConnectGuard& other) { Q_ASSERT(other.m_conns.isEmpty()); Q_UNUSED(other); return *this; } //! @} private: