Browse Source

atvmodsource: Initialize ATVModSource level and video members

Initialize previously uninitialized ATVModSource members to safe default
values to eliminate cppcheck UNINIT_CTOR warnings and uninitialized member
warnings reported by Coverity (UNINIT_CTOR).  and prevent undefined behavior
from reading uninitialized state.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 3 months ago
parent
commit
efd53e035a
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 12
      plugins/channeltx/modatv/atvmodsource.cpp

12
plugins/channeltx/modatv/atvmodsource.cpp

@ -112,13 +112,25 @@ ATVModSource::ATVModSource() : @@ -112,13 +112,25 @@ ATVModSource::ATVModSource() :
m_channelFrequencyOffset(0),
m_modPhasor(0.0f),
m_tvSampleRate(1000000),
m_pointsPerImgLine(0),
m_nbImageLines(0),
m_horizontalCount(0),
m_lineCount(0),
m_imageLine(0),
m_fps(25.0f),
m_levelCalcCount(0),
m_rmsLevel(0.0),
m_peakLevelOut(0.0),
m_peakLevel(0.0),
m_levelSum(0.0),
m_imageOK(false),
m_videoFPS(0.0f),
m_videoWidth(0),
m_videoHeight(0),
m_videoFPSq(1.0f),
m_videoFPSCount(0.0f),
m_videoPrevFPSCount(0),
m_videoLength(0),
m_videoEOF(false),
m_videoOK(false),
m_cameraIndex(-1),

Loading…
Cancel
Save