1
0
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:
Robin Getz
2026-08-02 19:50:33 -04:00
parent 7e96f9c139
commit f5d2bca4f6
+1 -1
View File
@@ -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++)
{