From f5d2bca4f6066c8d3f9f6fa4718c433bec382cbb Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sun, 2 Aug 2026 19:50:33 -0400 Subject: [PATCH] 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 --- ft8/ft4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ft8/ft4.cpp b/ft8/ft4.cpp index 4ed686670..44ee0d536 100644 --- a/ft8/ft4.cpp +++ b/ft8/ft4.cpp @@ -1452,7 +1452,7 @@ std::vector> FT4::soft_c2m(const FFTEngine::ffts_t &c103) con { m103[si].resize(4); float mx = -std::numeric_limits::infinity(); - float mx_phase; + float mx_phase = 0.0f; for (int bi = 0; bi < 4; bi++) {