From cf267b1254647f1e0987c84cef9c309cab136b34 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 5 May 2017 10:40:45 +0200 Subject: [PATCH] Code warnings in Eclipse cleanup --- .../channelrx/chanalyzer/chanalyzerplugin.cpp | 7 +++--- .../chanalyzerng/chanalyzerngplugin.cpp | 3 ++- plugins/channelrx/demodam/amdemodplugin.cpp | 3 ++- plugins/channelrx/demodatv/atvscreen.cpp | 4 ++++ plugins/channelrx/demodbfm/bfmplugin.cpp | 3 ++- plugins/channelrx/demodbfm/rdsdecoder.cpp | 1 + plugins/channelrx/demodbfm/rdsdemod.cpp | 1 + plugins/channelrx/demoddsd/dsddemod.cpp | 2 -- plugins/channelrx/demoddsd/dsddemodplugin.cpp | 3 ++- plugins/channelrx/demodlora/loraplugin.cpp | 3 ++- plugins/channelrx/demodnfm/nfmplugin.cpp | 3 ++- plugins/channelrx/demodssb/ssbdemod.cpp | 4 +++- plugins/channelrx/demodssb/ssbplugin.cpp | 3 ++- plugins/channelrx/demodwfm/wfmplugin.cpp | 3 ++- plugins/channelrx/tcpsrc/tcpsrc.cpp | 3 ++- plugins/channelrx/tcpsrc/tcpsrcplugin.cpp | 3 ++- plugins/channelrx/udpsrc/udpsrcplugin.cpp | 3 ++- plugins/channeltx/modam/ammodplugin.cpp | 3 ++- plugins/channeltx/modatv/atvmodplugin.cpp | 3 ++- plugins/channeltx/modnfm/nfmmodplugin.cpp | 3 ++- plugins/channeltx/modssb/ssbmodplugin.cpp | 3 ++- plugins/channeltx/modwfm/wfmmodplugin.cpp | 3 ++- .../samplesink/filesink/filesinkthread.cpp | 3 ++- .../fcdproplus/fcdproplusinputqt.cpp | 7 ++++-- .../sdrdaemonfec/sdrdaemonfecbuffer.cpp | 3 ++- sdrbase/dsp/bandpass.h | 2 +- sdrbase/dsp/dsptypes.h | 2 +- sdrbase/dsp/interpolator.cpp | 9 ++++++-- sdrbase/dsp/lowpass.h | 2 +- sdrbase/gui/cwkeyergui.cpp | 4 ++++ sdrbase/gui/glscope.cpp | 5 ++++- sdrbase/gui/glshadersimple.cpp | 4 +++- sdrbase/gui/glshadertextured.cpp | 4 +++- sdrbase/gui/glspectrum.cpp | 7 +++++- sdrbase/gui/scaleengine.cpp | 11 ++++++++-- sdrbase/util/bitfieldindex.h | 22 +++++++++---------- sdrbase/util/syncmessenger.cpp | 3 ++- 37 files changed, 106 insertions(+), 49 deletions(-) diff --git a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp index c99dcb927..a446db642 100644 --- a/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzerplugin.cpp @@ -1,9 +1,9 @@ -#include "../../channelrx/chanalyzer/chanalyzerplugin.h" +#include "chanalyzerplugin.h" #include #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) { } diff --git a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp index 0a5d24890..18a5cf1da 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp +++ b/plugins/channelrx/chanalyzerng/chanalyzerngplugin.cpp @@ -30,7 +30,8 @@ const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = { }; ChannelAnalyzerNGPlugin::ChannelAnalyzerNGPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index ef0b448ad..c1a5c6ce1 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { }; AMDemodPlugin::AMDemodPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodatv/atvscreen.cpp b/plugins/channelrx/demodatv/atvscreen.cpp index d3955909e..a36562514 100644 --- a/plugins/channelrx/demodatv/atvscreen.cpp +++ b/plugins/channelrx/demodatv/atvscreen.cpp @@ -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; } diff --git a/plugins/channelrx/demodbfm/bfmplugin.cpp b/plugins/channelrx/demodbfm/bfmplugin.cpp index fe5d5e021..26eff2511 100644 --- a/plugins/channelrx/demodbfm/bfmplugin.cpp +++ b/plugins/channelrx/demodbfm/bfmplugin.cpp @@ -32,7 +32,8 @@ const PluginDescriptor BFMPlugin::m_pluginDescriptor = { }; BFMPlugin::BFMPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodbfm/rdsdecoder.cpp b/plugins/channelrx/demodbfm/rdsdecoder.cpp index 8e4827646..730dc59ed 100644 --- a/plugins/channelrx/demodbfm/rdsdecoder.cpp +++ b/plugins/channelrx/demodbfm/rdsdecoder.cpp @@ -40,6 +40,7 @@ RDSDecoder::RDSDecoder() m_groupGoodBlocksCounter = 0; m_wrongBlocksCounter = 0; m_goodBlock = false; + m_qua = 0.0f; } RDSDecoder::~RDSDecoder() diff --git a/plugins/channelrx/demodbfm/rdsdemod.cpp b/plugins/channelrx/demodbfm/rdsdemod.cpp index 73155f569..b13e03cf0 100644 --- a/plugins/channelrx/demodbfm/rdsdemod.cpp +++ b/plugins/channelrx/demodbfm/rdsdemod.cpp @@ -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() diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index 66a644c6e..2c9926898 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -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) diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 3ec46f1ba..872bfa575 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -32,7 +32,8 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { }; DSDDemodPlugin::DSDDemodPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodlora/loraplugin.cpp b/plugins/channelrx/demodlora/loraplugin.cpp index 1a5925e0e..e52be51b6 100644 --- a/plugins/channelrx/demodlora/loraplugin.cpp +++ b/plugins/channelrx/demodlora/loraplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor LoRaPlugin::m_pluginDescriptor = { }; LoRaPlugin::LoRaPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodnfm/nfmplugin.cpp b/plugins/channelrx/demodnfm/nfmplugin.cpp index 2545989f1..58408b5c8 100644 --- a/plugins/channelrx/demodnfm/nfmplugin.cpp +++ b/plugins/channelrx/demodnfm/nfmplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor NFMPlugin::m_pluginDescriptor = { }; NFMPlugin::NFMPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index 8a2e04920..ead3a5b17 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -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"); diff --git a/plugins/channelrx/demodssb/ssbplugin.cpp b/plugins/channelrx/demodssb/ssbplugin.cpp index fe9b12ff3..e8bd29311 100644 --- a/plugins/channelrx/demodssb/ssbplugin.cpp +++ b/plugins/channelrx/demodssb/ssbplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor SSBPlugin::m_pluginDescriptor = { }; SSBPlugin::SSBPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/demodwfm/wfmplugin.cpp b/plugins/channelrx/demodwfm/wfmplugin.cpp index 9f3bc9f45..435ace7ad 100644 --- a/plugins/channelrx/demodwfm/wfmplugin.cpp +++ b/plugins/channelrx/demodwfm/wfmplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor WFMPlugin::m_pluginDescriptor = { }; WFMPlugin::WFMPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/tcpsrc/tcpsrc.cpp b/plugins/channelrx/tcpsrc/tcpsrc.cpp index e6a031d6b..c973f4be8 100644 --- a/plugins/channelrx/tcpsrc/tcpsrc.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrc.cpp @@ -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; diff --git a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp index 808fb70e0..2ef54414b 100644 --- a/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp +++ b/plugins/channelrx/tcpsrc/tcpsrcplugin.cpp @@ -15,7 +15,8 @@ const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = { }; TCPSrcPlugin::TCPSrcPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channelrx/udpsrc/udpsrcplugin.cpp b/plugins/channelrx/udpsrc/udpsrcplugin.cpp index 31054bf1b..7c5ad3fa6 100644 --- a/plugins/channelrx/udpsrc/udpsrcplugin.cpp +++ b/plugins/channelrx/udpsrc/udpsrcplugin.cpp @@ -32,7 +32,8 @@ const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = { }; UDPSrcPlugin::UDPSrcPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index 3dd222499..a438b7966 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -31,7 +31,8 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = { }; AMModPlugin::AMModPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channeltx/modatv/atvmodplugin.cpp b/plugins/channeltx/modatv/atvmodplugin.cpp index b4ba0c485..ff8b98be6 100644 --- a/plugins/channeltx/modatv/atvmodplugin.cpp +++ b/plugins/channeltx/modatv/atvmodplugin.cpp @@ -31,7 +31,8 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = { }; ATVModPlugin::ATVModPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index fb7ca1418..3dd1f678b 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -31,7 +31,8 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = { }; NFMModPlugin::NFMModPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channeltx/modssb/ssbmodplugin.cpp b/plugins/channeltx/modssb/ssbmodplugin.cpp index cbe420754..4d68cfc9c 100644 --- a/plugins/channeltx/modssb/ssbmodplugin.cpp +++ b/plugins/channeltx/modssb/ssbmodplugin.cpp @@ -31,7 +31,8 @@ const PluginDescriptor SSBModPlugin::m_pluginDescriptor = { }; SSBModPlugin::SSBModPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/channeltx/modwfm/wfmmodplugin.cpp b/plugins/channeltx/modwfm/wfmmodplugin.cpp index f7fa2d6c8..e2313c19e 100644 --- a/plugins/channeltx/modwfm/wfmmodplugin.cpp +++ b/plugins/channeltx/modwfm/wfmmodplugin.cpp @@ -31,7 +31,8 @@ const PluginDescriptor WFMModPlugin::m_pluginDescriptor = { }; WFMModPlugin::WFMModPlugin(QObject* parent) : - QObject(parent) + QObject(parent), + m_pluginAPI(0) { } diff --git a/plugins/samplesink/filesink/filesinkthread.cpp b/plugins/samplesink/filesink/filesinkthread.cpp index b7e3581fa..315be243d 100644 --- a/plugins/samplesink/filesink/filesinkthread.cpp +++ b/plugins/samplesink/filesink/filesinkthread.cpp @@ -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); } diff --git a/plugins/samplesource/fcdproplus/fcdproplusinputqt.cpp b/plugins/samplesource/fcdproplus/fcdproplusinputqt.cpp index b388e5d9c..3a8f8a328 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinputqt.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinputqt.cpp @@ -33,7 +33,10 @@ MESSAGE_CLASS_DEFINITION(FCDProPlusInput::MsgConfigureFCD, Message) FCDProPlusInput::FCDProPlusInput() : m_dev(0), m_settings(), - m_deviceDescription(fcd_traits::displayedName) + m_deviceDescription(fcd_traits::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; diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecbuffer.cpp b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecbuffer.cpp index e89b62083..aa187bad8 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecbuffer.cpp +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecbuffer.cpp @@ -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); diff --git a/sdrbase/dsp/bandpass.h b/sdrbase/dsp/bandpass.h index 3e0ffb147..692b19d08 100644 --- a/sdrbase/dsp/bandpass.h +++ b/sdrbase/dsp/bandpass.h @@ -7,7 +7,7 @@ template class Bandpass { public: - Bandpass() { } + Bandpass() : m_ptr(0) { } void create(int nTaps, double sampleRate, double lowCutoff, double highCutoff) { diff --git a/sdrbase/dsp/dsptypes.h b/sdrbase/dsp/dsptypes.h index 411870605..98f940933 100644 --- a/sdrbase/dsp/dsptypes.h +++ b/sdrbase/dsp/dsptypes.h @@ -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) {} diff --git a/sdrbase/dsp/interpolator.cpp b/sdrbase/dsp/interpolator.cpp index c2dade6aa..7f4118973 100644 --- a/sdrbase/dsp/interpolator.cpp +++ b/sdrbase/dsp/interpolator.cpp @@ -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) { } diff --git a/sdrbase/dsp/lowpass.h b/sdrbase/dsp/lowpass.h index 355941210..b7b5e6ed4 100644 --- a/sdrbase/dsp/lowpass.h +++ b/sdrbase/dsp/lowpass.h @@ -7,7 +7,7 @@ template class Lowpass { public: - Lowpass() { } + Lowpass() : m_ptr(0) { } void create(int nTaps, double sampleRate, double cutoff) { diff --git a/sdrbase/gui/cwkeyergui.cpp b/sdrbase/gui/cwkeyergui.cpp index 6c053d5a3..1c259d68e 100644 --- a/sdrbase/gui/cwkeyergui.cpp +++ b/sdrbase/gui/cwkeyergui.cpp @@ -84,6 +84,10 @@ bool CWKeyerGUI::deserialize(const QByteArray& data) applySettings(); return true; } + else + { + return false; + } } // === SLOTS ================================================================== diff --git a/sdrbase/gui/glscope.cpp b/sdrbase/gui/glscope.cpp index 6ed90e7f2..c3c477b98 100644 --- a/sdrbase/gui/glscope.cpp +++ b/sdrbase/gui/glscope.cpp @@ -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())); diff --git a/sdrbase/gui/glshadersimple.cpp b/sdrbase/gui/glshadersimple.cpp index a0f6a159d..e06b7f997 100644 --- a/sdrbase/gui/glshadersimple.cpp +++ b/sdrbase/gui/glshadersimple.cpp @@ -25,7 +25,9 @@ #include "gui/glshadersimple.h" GLShaderSimple::GLShaderSimple() : - m_program(0) + m_program(0), + m_colorLoc(0), + m_matrixLoc(0) { } GLShaderSimple::~GLShaderSimple() diff --git a/sdrbase/gui/glshadertextured.cpp b/sdrbase/gui/glshadertextured.cpp index 2b9eabbcf..1d7f1a9f6 100644 --- a/sdrbase/gui/glshadertextured.cpp +++ b/sdrbase/gui/glshadertextured.cpp @@ -27,7 +27,9 @@ GLShaderTextured::GLShaderTextured() : m_program(0), - m_texture(0) + m_texture(0), + m_matrixLoc(0), + m_textureLoc(0) { } GLShaderTextured::~GLShaderTextured() diff --git a/sdrbase/gui/glspectrum.cpp b/sdrbase/gui/glspectrum.cpp index 4c561ad4f..c6031d12b 100644 --- a/sdrbase/gui/glspectrum.cpp +++ b/sdrbase/gui/glspectrum.cpp @@ -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); diff --git a/sdrbase/gui/scaleengine.cpp b/sdrbase/gui/scaleengine.cpp index 696464aad..a1368e065 100644 --- a/sdrbase/gui/scaleengine.cpp +++ b/sdrbase/gui/scaleengine.cpp @@ -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) { } diff --git a/sdrbase/util/bitfieldindex.h b/sdrbase/util/bitfieldindex.h index 166712282..e1c8d93a3 100644 --- a/sdrbase/util/bitfieldindex.h +++ b/sdrbase/util/bitfieldindex.h @@ -21,32 +21,32 @@ #include template -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 BitfieldIndex operator+(const BitfieldIndex &a, const BitfieldIndex &b) { BitfieldIndex x; x.v = x.a + x.b; return x; } - + template BitfieldIndex operator-(const BitfieldIndex &a, const BitfieldIndex &b) { BitfieldIndex x; x.v = x.a - x.b; return x; } diff --git a/sdrbase/util/syncmessenger.cpp b/sdrbase/util/syncmessenger.cpp index 2a8ea69eb..2094912e7 100644 --- a/sdrbase/util/syncmessenger.cpp +++ b/sdrbase/util/syncmessenger.cpp @@ -20,7 +20,8 @@ SyncMessenger::SyncMessenger() : m_complete(0), - m_result(0) + m_result(0), + m_message(0) { qRegisterMetaType("Message"); }