1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-13 11:51:47 -05:00

Code warnings in Eclipse cleanup

This commit is contained in:
f4exb 2017-05-05 10:40:45 +02:00
parent a4de2be023
commit cf267b1254
37 changed files with 106 additions and 49 deletions

View File

@ -1,9 +1,9 @@
#include "../../channelrx/chanalyzer/chanalyzerplugin.h"
#include "chanalyzerplugin.h"
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "../../channelrx/chanalyzer/chanalyzergui.h"
#include "chanalyzergui.h"
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
QString("Channel Analyzer"),
@ -15,7 +15,8 @@ const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
};
ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -30,7 +30,8 @@ const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = {
};
ChannelAnalyzerNGPlugin::ChannelAnalyzerNGPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -15,7 +15,8 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
};
AMDemodPlugin::AMDemodPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -194,6 +194,8 @@ bool ATVScreen::selectRow(int intLine)
{
return m_objGLShaderArray.SelectRow(intLine);
}
return false;
}
bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
@ -203,4 +205,6 @@ bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
return m_objGLShaderArray.SetDataColor(intCol,
qRgb(intRed, intGreen, intBlue));
}
return false;
}

View File

@ -32,7 +32,8 @@ const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
};
BFMPlugin::BFMPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -40,6 +40,7 @@ RDSDecoder::RDSDecoder()
m_groupGoodBlocksCounter = 0;
m_wrongBlocksCounter = 0;
m_goodBlock = false;
m_qua = 0.0f;
}
RDSDecoder::~RDSDecoder()

View File

@ -45,6 +45,7 @@ RDSDemod::RDSDemod()
m_parms.counter = 0;
m_parms.reading_frame = 0;
m_parms.dbit = 0;
m_prev = 0.0f;
}
RDSDemod::~RDSDemod()

View File

@ -27,8 +27,6 @@
#include "dsp/dspengine.h"
#include "../../channelrx/demoddsd/dsddemodgui.h"
static const Real afSqTones[2] = {1200.0, 6400.0}; // {1200.0, 8000.0};
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message)
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message)

View File

@ -32,7 +32,8 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
};
DSDDemodPlugin::DSDDemodPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -15,7 +15,8 @@ const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
};
LoRaPlugin::LoRaPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -15,7 +15,8 @@ const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
};
NFMPlugin::NFMPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -32,7 +32,9 @@ SSBDemod::SSBDemod(BasebandSampleSink* sampleSink) :
m_audioFifo(4, 24000),
m_settingsMutex(QMutex::Recursive),
m_audioBinaual(false),
m_audioFlipChannels(false)
m_audioFlipChannels(false),
m_audioMute(false),
m_dsb(false)
{
setObjectName("SSBDemod");

View File

@ -15,7 +15,8 @@ const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
};
SSBPlugin::SSBPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -15,7 +15,8 @@ const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
};
WFMPlugin::WFMPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -35,6 +35,7 @@ TCPSrc::TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, BasebandSampl
m_sampleFormat = FormatSSB;
m_outputSampleRate = 48000;
m_rfBandwidth = 32000;
m_tcpServer = 0;
m_tcpPort = 9999;
m_nco.setFreq(0, m_inputSampleRate);
m_interpolator.create(16, m_inputSampleRate, m_rfBandwidth / 2.0);
@ -145,7 +146,7 @@ void TCPSrc::feed(const SampleVector::const_iterator& begin, const SampleVector:
- m_last.imag() * (m_this.real() - sideband[i+1].real());
m_this = sideband[i+1];
m_sampleBufferSSB.push_back(Sample(l * m_scale, r * m_scale));
sum += m_this.real() * m_this.real() + m_this.imag() * m_this.imag();
sum += m_this.real() * m_this.real() + m_this.imag() * m_this.imag();
}
// TODO: correct levels
m_scale = 24000 * tcpFftLen / sum;

View File

@ -15,7 +15,8 @@ const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = {
};
TCPSrcPlugin::TCPSrcPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -32,7 +32,8 @@ const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
};
UDPSrcPlugin::UDPSrcPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -31,7 +31,8 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
};
AMModPlugin::AMModPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -31,7 +31,8 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
};
ATVModPlugin::ATVModPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -31,7 +31,8 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
};
NFMModPlugin::NFMModPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -31,7 +31,8 @@ const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
};
SSBModPlugin::SSBModPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -31,7 +31,8 @@ const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
};
WFMModPlugin::WFMModPlugin(QObject* parent) :
QObject(parent)
QObject(parent),
m_pluginAPI(0)
{
}

View File

@ -35,7 +35,8 @@ FileSinkThread::FileSinkThread(std::ofstream *samplesStream, SampleSourceFifo* s
m_log2Interpolation(0),
m_throttlems(FILESINK_THROTTLE_MS),
m_throttleToggle(false),
m_buf(0)
m_buf(0),
m_maxThrottlems(50)
{
assert(m_ofstream != 0);
}

View File

@ -33,7 +33,10 @@ MESSAGE_CLASS_DEFINITION(FCDProPlusInput::MsgConfigureFCD, Message)
FCDProPlusInput::FCDProPlusInput() :
m_dev(0),
m_settings(),
m_deviceDescription(fcd_traits<ProPlus>::displayedName)
m_deviceDescription(fcd_traits<ProPlus>::displayedName),
m_FCDThread(0),
m_running(false),
m_deviceAPI(0)
{
m_FCDReader = new FCDProPlusReader(&m_sampleFifo);
}
@ -161,7 +164,7 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
set_bias_t(settings.m_biasT);
}
}
if ((m_settings.m_mixGain != settings.m_mixGain) || force)
{
m_settings.m_mixGain = settings.m_mixGain;

View File

@ -45,7 +45,8 @@ SDRdaemonFECBuffer::SDRdaemonFECBuffer(uint32_t throttlems) :
m_nbReads(0),
m_nbWrites(0),
m_balCorrection(0),
m_balCorrLimit(0)
m_balCorrLimit(0),
m_curOriginalBlocks(0)
{
m_currentMeta.init();
m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame);

View File

@ -7,7 +7,7 @@
template <class Type> class Bandpass {
public:
Bandpass() { }
Bandpass() : m_ptr(0) { }
void create(int nTaps, double sampleRate, double lowCutoff, double highCutoff)
{

View File

@ -32,7 +32,7 @@ typedef qint16 FixReal;
#pragma pack(push, 1)
struct Sample
{
Sample() {}
Sample() : m_real(0), m_imag(0) {}
Sample(FixReal real) : m_real(real), m_imag(0) {}
Sample(FixReal real, FixReal imag) : m_real(real), m_imag(imag) {}
Sample(const Sample& other) : m_real(other.m_real), m_imag(other.m_imag) {}

View File

@ -56,8 +56,13 @@ void Interpolator::createPolyphaseLowPass(
}
Interpolator::Interpolator() :
m_taps(NULL),
m_alignedTaps(NULL)
m_taps(0),
m_alignedTaps(0),
m_nTaps(1),
m_ptr(0),
m_taps2(0),
m_alignedTaps2(0),
m_phaseSteps(1)
{
}

View File

@ -7,7 +7,7 @@
template <class Type> class Lowpass {
public:
Lowpass() { }
Lowpass() : m_ptr(0) { }
void create(int nTaps, double sampleRate, double cutoff)
{

View File

@ -84,6 +84,10 @@ bool CWKeyerGUI::deserialize(const QByteArray& data)
applySettings();
return true;
}
else
{
return false;
}
}
// === SLOTS ==================================================================

View File

@ -65,7 +65,10 @@ GLScope::GLScope(QWidget* parent) :
m_prevArg(0),
m_displayGridIntensity(5),
m_displayTraceIntensity(50),
m_powerOverlayFont(font())
m_powerOverlayFont(font()),
m_maxPow(0.0f),
m_sumPow(0.0f),
m_nbPow(1)
{
setAttribute(Qt::WA_OpaquePaintEvent);
connect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));

View File

@ -25,7 +25,9 @@
#include "gui/glshadersimple.h"
GLShaderSimple::GLShaderSimple() :
m_program(0)
m_program(0),
m_colorLoc(0),
m_matrixLoc(0)
{ }
GLShaderSimple::~GLShaderSimple()

View File

@ -27,7 +27,9 @@
GLShaderTextured::GLShaderTextured() :
m_program(0),
m_texture(0)
m_texture(0),
m_matrixLoc(0),
m_textureLoc(0)
{ }
GLShaderTextured::~GLShaderTextured()

View File

@ -53,7 +53,12 @@ GLSpectrum::GLSpectrum(QWidget* parent) :
m_histogram(NULL),
m_histogramHoldoff(NULL),
m_displayHistogram(true),
m_displayChanged(false)
m_displayChanged(false),
m_colorLoc(0),
m_waterfallBufferPos(0),
m_cursorChannel(0),
m_waterfallTexturePos(0),
m_matrixLoc(0)
{
setAutoFillBackground(false);
setAttribute(Qt::WA_OpaquePaintEvent, true);

View File

@ -269,7 +269,7 @@ double ScaleEngine::calcMajorTickUnits(double distance, int* retDecimalPlaces)
}/*
}*/
if(retDecimalPlaces != NULL) {
if(retDecimalPlaces != 0) {
if(decimalPlaces < 0)
decimalPlaces = 0;
*retDecimalPlaces = decimalPlaces;
@ -489,7 +489,14 @@ ScaleEngine::ScaleEngine() :
m_physicalUnit(Unit::None),
m_rangeMin(-1.0),
m_rangeMax(1.0),
m_recalc(true)
m_recalc(true),
m_charSize(8),
m_numMinorTicks(1),
m_decimalPlaces(1),
m_size(1.0f),
m_firstMajorTickValue(1.0),
m_majorTickValueDistance(1.0),
m_scale(1.0f)
{
}

View File

@ -21,32 +21,32 @@
#include <stdint.h>
template <unsigned int size>
struct BitfieldIndex
struct BitfieldIndex
{
uint32_t v : size;
BitfieldIndex() {}
BitfieldIndex() : v(0) {}
BitfieldIndex(int i) { v = i; }
BitfieldIndex& operator=(const BitfieldIndex& rhs) { v = rhs.v; return *this; }
BitfieldIndex& operator=(const int& rhi) { v = rhi; return *this; }
BitfieldIndex& operator++() { v++; return *this; }
BitfieldIndex operator++(int) { BitfieldIndex x(*this); ++(*this); return x; }
BitfieldIndex& operator+=(const BitfieldIndex& b) { v += b.v; return *this; }
BitfieldIndex& operator+=(const BitfieldIndex& b) { v += b.v; return *this; }
BitfieldIndex& operator-=(const BitfieldIndex& b) { v -= b.v; return *this; }
BitfieldIndex& operator+=(int i) { v += i; return *this; }
BitfieldIndex& operator+=(int i) { v += i; return *this; }
BitfieldIndex& operator-=(int i) { v -= i; return *this; }
BitfieldIndex operator+(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v += b.v; return x; }
BitfieldIndex operator-(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v -= b.v; return x; }
BitfieldIndex operator+(int i) const { BitfieldIndex x(*this); x.v += i; return x; }
BitfieldIndex operator-(int i) const { BitfieldIndex x(*this); x.v -= i; return x; }
BitfieldIndex operator+(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v += b.v; return x; }
BitfieldIndex operator-(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v -= b.v; return x; }
BitfieldIndex operator+(int i) const { BitfieldIndex x(*this); x.v += i; return x; }
BitfieldIndex operator-(int i) const { BitfieldIndex x(*this); x.v -= i; return x; }
operator int() const { return v; }
};
template <unsigned int size>
BitfieldIndex<size> operator+(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a + x.b; return x; }
template <unsigned int size>
BitfieldIndex<size> operator-(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a - x.b; return x; }

View File

@ -20,7 +20,8 @@
SyncMessenger::SyncMessenger() :
m_complete(0),
m_result(0)
m_result(0),
m_message(0)
{
qRegisterMetaType<Message>("Message");
}