From b82bccdadc04063552e48e7fcc871a5a15c2192d Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 10 Aug 2026 18:15:29 -0400 Subject: [PATCH] modemm17: initialize SyncWord sample buffer Initialize samples_ during construction so the sample buffer is not left indeterminate. The existing triggered_ state ensures the buffer is initialized with fill() before its contents are used, so this is defensive initialization rather than a functional fix. Detected by cppcheck. Signed-off-by: Robin Getz --- modemm17/Correlator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/modemm17/Correlator.h b/modemm17/Correlator.h index 54ba44c6b..10f467533 100644 --- a/modemm17/Correlator.h +++ b/modemm17/Correlator.h @@ -135,6 +135,7 @@ struct SyncWord float magnitude_2 = std::numeric_limits::lowest() ) : sync_word_(std::move(sync_word)), + samples_{}, magnitude_1_(magnitude_1), magnitude_2_(magnitude_2) {}