From ee947f54e92de25cf6a0d0d08c7ad7c29a9e99f1 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 21 Nov 2016 18:01:55 +0100 Subject: [PATCH] Corrected clang warnings --- plugins/channelrx/demodbfm/bfmdemodgui.cpp | 6 +++--- plugins/channelrx/tcpsrc/tcpsrc.cpp | 2 ++ sdrbase/dsp/inthalfbandfilter.h | 4 ++-- sdrbase/dsp/inthalfbandfilterdb.h | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.cpp b/plugins/channelrx/demodbfm/bfmdemodgui.cpp index e28cfd6d3..dfe175310 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.cpp +++ b/plugins/channelrx/demodbfm/bfmdemodgui.cpp @@ -297,7 +297,7 @@ void BFMDemodGUI::on_g14ProgServiceNames_currentIndexChanged(int index) RDSParser::freqs_set_t::iterator sIt = (mIt->second).begin(); const RDSParser::freqs_set_t::iterator sItEnd = (mIt->second).end(); - for (sIt; sIt != sItEnd; ++sIt) + for (; sIt != sItEnd; ++sIt) { std::ostringstream os; os << std::fixed << std::showpoint << std::setprecision(2) << *sIt; @@ -315,7 +315,7 @@ void BFMDemodGUI::on_g14ProgServiceNames_currentIndexChanged(int index) RDSParser::freqs_set_t::iterator sIt = (mIt->second).begin(); const RDSParser::freqs_set_t::iterator sItEnd = (mIt->second).end(); - for (sIt; sIt != sItEnd; ++sIt) + for (; sIt != sItEnd; ++sIt) { std::ostringstream os; os << std::fixed << std::showpoint << std::setprecision(2) << *sIt; @@ -753,7 +753,7 @@ void BFMDemodGUI::rdsUpdate(bool force) const RDSParser::psns_map_t::iterator itEnd = m_rdsParser.m_g14_program_service_names.end(); int i = 0; - for (it; it != itEnd; ++it, i++) + for (; it != itEnd; ++it, i++) { m_g14ComboIndex.push_back(it->first); QString pistring(str(boost::format("%04X:%s") % it->first % it->second).c_str()); diff --git a/plugins/channelrx/tcpsrc/tcpsrc.cpp b/plugins/channelrx/tcpsrc/tcpsrc.cpp index 3db06de1f..e6a031d6b 100644 --- a/plugins/channelrx/tcpsrc/tcpsrc.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrc.cpp @@ -277,6 +277,8 @@ bool TCPSrc::handleMessage(const Message& cmd) return false; } } + + return false; } void TCPSrc::closeAllSockets(Sockets* sockets) diff --git a/sdrbase/dsp/inthalfbandfilter.h b/sdrbase/dsp/inthalfbandfilter.h index b362bd6a9..4f5b9bef4 100644 --- a/sdrbase/dsp/inthalfbandfilter.h +++ b/sdrbase/dsp/inthalfbandfilter.h @@ -543,8 +543,8 @@ protected: iAcc += ((qint32)m_samples[a][0] + 1) << (HBFIRFilterTraits::hbShift - 1); qAcc += ((qint32)m_samples[a][1] + 1) << (HBFIRFilterTraits::hbShift - 1); - sample->setReal(iAcc >> HBFIRFilterTraits::hbShift -1); - sample->setImag(qAcc >> HBFIRFilterTraits::hbShift -1); + sample->setReal(iAcc >> (HBFIRFilterTraits::hbShift -1)); + sample->setImag(qAcc >> (HBFIRFilterTraits::hbShift -1)); } void doFIR(qint32 *x, qint32 *y) diff --git a/sdrbase/dsp/inthalfbandfilterdb.h b/sdrbase/dsp/inthalfbandfilterdb.h index 5b03e385d..17f86b40d 100644 --- a/sdrbase/dsp/inthalfbandfilterdb.h +++ b/sdrbase/dsp/inthalfbandfilterdb.h @@ -447,8 +447,8 @@ protected: iAcc += ((qint32)m_samplesDB[b-1][0]) << (HBFIRFilterTraits::hbShift - 1); qAcc += ((qint32)m_samplesDB[b-1][1]) << (HBFIRFilterTraits::hbShift - 1); - sample->setReal(iAcc >> HBFIRFilterTraits::hbShift -1); - sample->setImag(qAcc >> HBFIRFilterTraits::hbShift -1); + sample->setReal(iAcc >> (HBFIRFilterTraits::hbShift -1)); + sample->setImag(qAcc >> (HBFIRFilterTraits::hbShift -1)); } void doFIR(qint32 *x, qint32 *y)