Browse Source

modemdvb: Initialize OFDM demodulator state

Initialize ring buffer, smoothing, phase tracking, and TPS state
in the OFDM demodulator constructor to prevent use of
indeterminate member values.

Identified by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
e75f7f5e4d
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 9
      modemdvb/dvbtofdm.cpp

9
modemdvb/dvbtofdm.cpp

@ -232,7 +232,14 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) : @@ -232,7 +232,14 @@ OFDMDemod::OFDMDemod(int bandwidthHz, FFTFactory *fftFactory) :
m_guardSize(0),
m_symbolSize(0),
m_kMax(0),
m_backoff(0)
m_backoff(0),
m_ring{},
m_smoothingCutoff(0.0),
m_noiseConstellation(Constellation::QPSK),
m_lastSPPhase(0),
m_spPhaseRun(0),
m_tpsSync(0),
m_tpsBits{}
{
m_fft.m_factory = fftFactory;
m_cirFft.m_factory = fftFactory;

Loading…
Cancel
Save