Browse Source

ft4: Initialize uninitialized decoder members

cppcheck reported uninitialized scalar members in the FT4 constructor.
Initialize pass_ and cached sample values hack_0_ and hack_1_ to avoid
undefined behavior when these members are used before assignment.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 4 months ago
parent
commit
353b29b339
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 3
      ft8/ft4.cpp

3
ft8/ft4.cpp

@ -122,6 +122,9 @@ FT4::FT4( @@ -122,6 +122,9 @@ FT4::FT4(
hack_len_ = -1;
fftEngine_ = fftEngine;
npasses_ = 1;
pass_ = 0;
hack_0_ = 0.0f;
hack_1_ = 0.0f;
}
void FT4::start_work()

Loading…
Cancel
Save