From 97db87d3c2c1e0bd9c8c6d63c1b647b096b20f08 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 10 Aug 2026 18:06:45 -0400 Subject: [PATCH] ft8: initialize cached statistics members Initialize mean_, stddev_, and b_ in the Stats constructor so the cached members are not left indeterminate before finalize() populates them. The finalized_ state already protects these members from being read before they are calculated, so this is a defensive initialization rather than a functional fix. Detected by cppcheck. Signed-off-by: Robin Getz --- ft8/ft8stats.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ft8/ft8stats.cpp b/ft8/ft8stats.cpp index 8fc17181d..49d010a1f 100644 --- a/ft8/ft8stats.cpp +++ b/ft8/ft8stats.cpp @@ -28,6 +28,9 @@ namespace FT8 { Stats::Stats(int how, float log_tail, float log_rate) : sum_(0), finalized_(false), + mean_(0), + stddev_(0), + b_(0), how_(how), log_tail_(log_tail), log_rate_(log_rate)