From 10d9d503c7816c7d8e9cdaad55814f3be8b2ca45 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 22 Jul 2026 20:20:30 -0400 Subject: [PATCH] RadioAstronomy: Initialize FFT measurement fields Initialize previously unset FFTMeasurement members with defined default values so newly constructed measurement objects start in a known state. Although these fields are populated during normal measurement processing, constructors should establish a complete and deterministic object state rather than leaving scalar members with indeterminate values. This also makes the class safer if the initialization sequence changes in the future. This fixes a Coverity UNINIT_CTOR warning caused by uninitialized scalar members in the constructor. Signed-off-by: Robin Getz --- .../radioastronomy/radioastronomygui.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.h b/plugins/channelrx/radioastronomy/radioastronomygui.h index 4f59baab3..d841be792 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.h +++ b/plugins/channelrx/radioastronomy/radioastronomygui.h @@ -96,7 +96,7 @@ class RadioAstronomyGUI : public ChannelGUI { float m_solarFlux; float m_airTemp; float m_skyTemp; - float m_sensor[RADIOASTRONOMY_SENSORS]; + float m_sensor[RADIOASTRONOMY_SENSORS] {0.0f}; bool m_rotValid; float m_rotAz; @@ -107,6 +107,10 @@ class RadioAstronomyGUI : public ChannelGUI { int m_sweepIndex; FFTMeasurement() : + m_centerFrequency(0), + m_sampleRate(0), + m_integration(0), + m_rfBandwidth(0), m_fftSize(0), m_fftData(nullptr), m_db(nullptr), @@ -124,7 +128,18 @@ class RadioAstronomyGUI : public ChannelGUI { m_sigmaS(0.0f), m_tempMin(0.0f), m_baseline(RadioAstronomySettings::SBL_TSYS0), + m_omegaA(0.0f), + m_omegaS(0.0f), m_coordsValid(false), + m_ra(0.0f), + m_dec(0.0f), + m_azimuth(0.0f), + m_elevation(0.0f), + m_l(0.0f), + m_b(0.0f), + m_vBCRS(0.0f), + m_vLSR(0.0f), + m_solarFlux(0.0f), m_airTemp(0.0), m_skyTemp(0.0), m_rotValid(false),