Browse Source

Fixed -Wunused-but-set-variable warnings

chirpmodem-v8.0.0
f4exb 6 years ago
parent
commit
4e2978f7ea
  1. 76
      plugins/channelrx/demodadsb/adsbdemodgui.cpp
  2. 2
      plugins/samplemimo/limesdrmimo/limesdrmimo.cpp
  3. 9
      plugins/samplesink/xtrxoutput/xtrxoutput.cpp
  4. 9
      plugins/samplesource/xtrxinput/xtrxinput.cpp
  5. 2
      sdrbase/dsp/samplemififo.cpp

76
plugins/channelrx/demodadsb/adsbdemodgui.cpp

@ -811,44 +811,44 @@ void ADSBDemodGUI::handleADSB( @@ -811,44 +811,44 @@ void ADSBDemodGUI::handleADSB(
}
else if ((movement >= 2) && (movement <= 123))
{
float base, step; // In knts
int adjust;
if ((movement >= 2) && (movement <= 8))
{
base = 0.125f;
step = 0.125f;
adjust = 2;
}
else if ((movement >= 9) && (movement <= 12))
{
base = 1.0f;
step = 0.25f;
adjust = 9;
}
else if ((movement >= 13) && (movement <= 38))
{
base = 2.0f;
step = 0.5f;
adjust = 13;
}
else if ((movement >= 39) && (movement <= 93))
{
base = 15.0f;
step = 1.0f;
adjust = 39;
}
else if ((movement >= 94) && (movement <= 108))
{
base = 70.0f;
step = 2.0f;
adjust = 94;
}
else
{
base = 100.0f;
step = 5.0f;
adjust = 109;
}
// float base, step; // In knts
// int adjust;
// if ((movement >= 2) && (movement <= 8))
// {
// base = 0.125f;
// step = 0.125f;
// adjust = 2;
// }
// else if ((movement >= 9) && (movement <= 12))
// {
// base = 1.0f;
// step = 0.25f;
// adjust = 9;
// }
// else if ((movement >= 13) && (movement <= 38))
// {
// base = 2.0f;
// step = 0.5f;
// adjust = 13;
// }
// else if ((movement >= 39) && (movement <= 93))
// {
// base = 15.0f;
// step = 1.0f;
// adjust = 39;
// }
// else if ((movement >= 94) && (movement <= 108))
// {
// base = 70.0f;
// step = 2.0f;
// adjust = 94;
// }
// else
// {
// base = 100.0f;
// step = 5.0f;
// adjust = 109;
// }
aircraft->m_speedType = Aircraft::GS;
aircraft->m_speedValid = true;
aircraft->m_speedItem->setData(Qt::DisplayRole, m_settings.m_siUnits ? knotsToKPHInt(aircraft->m_speed) : (int)std::round(aircraft->m_speed));

2
plugins/samplemimo/limesdrmimo/limesdrmimo.cpp

@ -802,7 +802,7 @@ bool LimeSDRMIMO::applySettings(const LimeSDRMIMOSettings& settings, bool force) @@ -802,7 +802,7 @@ bool LimeSDRMIMO::applySettings(const LimeSDRMIMOSettings& settings, bool force)
}
if ((m_settings.m_ncoFrequencyRx != settings.m_ncoFrequencyRx) ||
(m_settings.m_ncoEnableRx != settings.m_ncoEnableRx) || force)
(m_settings.m_ncoEnableRx != settings.m_ncoEnableRx) || force || forceRxNCOFrequency)
{
forwardChangeRxDSP = true;
applyRxNCOFrequency(0, settings.m_ncoEnableRx, settings.m_ncoFrequencyRx);

9
plugins/samplesink/xtrxoutput/xtrxoutput.cpp

@ -382,6 +382,10 @@ void XTRXOutput::stop() @@ -382,6 +382,10 @@ void XTRXOutput::stop()
// remove old thread address from buddies (reset in all buddies)
const std::vector<DeviceAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
std::vector<DeviceAPI*>::const_iterator it = sinkBuddies.begin();
for (; it != sinkBuddies.end(); ++it) {
((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_sink->setThread(nullptr);
}
}
else if (nbOriginalChannels == 2) // Reduce from MO to SO by deleting and re-creating the thread
{
@ -398,6 +402,11 @@ void XTRXOutput::stop() @@ -398,6 +402,11 @@ void XTRXOutput::stop()
// remove old thread address from buddies (reset in all buddies). The address being held only in the owning source.
const std::vector<DeviceAPI*>& sinkBuddies = m_deviceAPI->getSinkBuddies();
std::vector<DeviceAPI*>::const_iterator it = sinkBuddies.begin();
for (; it != sinkBuddies.end(); ++it) {
((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_sink->setThread(nullptr);
}
applySettings(m_settings, true);
xtrxOutputThread->startWork();
}

9
plugins/samplesource/xtrxinput/xtrxinput.cpp

@ -392,6 +392,10 @@ void XTRXInput::stop() @@ -392,6 +392,10 @@ void XTRXInput::stop()
// remove old thread address from buddies (reset in all buddies)
const std::vector<DeviceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
std::vector<DeviceAPI*>::const_iterator it = sourceBuddies.begin();
for (; it != sourceBuddies.end(); ++it) {
((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_source->setThread(nullptr);
}
}
else if (nbOriginalChannels == 2) // Reduce from MI to SI by deleting and re-creating the thread
{
@ -409,6 +413,11 @@ void XTRXInput::stop() @@ -409,6 +413,11 @@ void XTRXInput::stop()
// remove old thread address from buddies (reset in all buddies). The address being held only in the owning source.
const std::vector<DeviceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
std::vector<DeviceAPI*>::const_iterator it = sourceBuddies.begin();
for (; it != sourceBuddies.end(); ++it) {
((DeviceXTRXShared*) (*it)->getBuddySharedPtr())->m_source->setThread(nullptr);
}
applySettings(m_settings, true);
xtrxInputThread->startWork();
}

2
sdrbase/dsp/samplemififo.cpp

@ -157,7 +157,6 @@ void SampleMIFifo::readSync( @@ -157,7 +157,6 @@ void SampleMIFifo::readSync(
}
QMutexLocker mutexLocker(&m_mutex);
std::vector<SampleVector>::iterator dataIt = m_data.begin();
vpart1Begin.resize(m_nbStreams);
vpart1End.resize(m_nbStreams);
vpart2Begin.resize(m_nbStreams);
@ -197,7 +196,6 @@ void SampleMIFifo::readSync( @@ -197,7 +196,6 @@ void SampleMIFifo::readSync(
}
QMutexLocker mutexLocker(&m_mutex);
std::vector<SampleVector>::iterator dataIt = m_data.begin();
vpart1Begin.resize(m_nbStreams);
vpart1End.resize(m_nbStreams);
vpart2Begin.resize(m_nbStreams);

Loading…
Cancel
Save