mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-10 13:33:49 -04:00
ft4: Initialize uninitialized phase variable in soft decoder
Coverity reported an uninitialized scalar variable in FT4::soft_c2m(). Initialize the maximum tone phase value to avoid using an undefined value when no tone exceeds the initial magnitude threshold. Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
+1
-1
@@ -1452,7 +1452,7 @@ std::vector<std::vector<float>> FT4::soft_c2m(const FFTEngine::ffts_t &c103) con
|
||||
{
|
||||
m103[si].resize(4);
|
||||
float mx = -std::numeric_limits<float>::infinity();
|
||||
float mx_phase;
|
||||
float mx_phase = 0.0f;
|
||||
|
||||
for (int bi = 0; bi < 4; bi++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user