From 35efcdae8ab5a80de95eba9edb15eb8c45f8203e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 22 Aug 2026 09:21:19 -0400 Subject: [PATCH] leansdr/sdr: initialize cstln_lut members Initialize the LUT and MODCOD tracking members in cstln_lut to avoid leaving them uninitialized during construction. Initialize mer_out to nullptr in fast_qpsk_receiver to prevent use of an uninitialized output pointer. Reported by cppcheck. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/sdr.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demoddatv/leansdr/sdr.h b/plugins/channelrx/demoddatv/leansdr/sdr.h index d35dcbd70..684322a54 100644 --- a/plugins/channelrx/demoddatv/leansdr/sdr.h +++ b/plugins/channelrx/demoddatv/leansdr/sdr.h @@ -539,7 +539,11 @@ struct cstln_lut : cstln_base float gamma1 = 0, float gamma2 = 0, float gamma3 = 0 - ) + ) : + lut{}, + m_typeCode(0), + m_rateCode(0), + m_setByModcod(false) { symbols = nullptr; @@ -1477,7 +1481,8 @@ struct fast_qpsk_receiver : runnable out(_out, chunk_size), mu(0), phase(0), - meas_count(0) + meas_count(0), + mer_out(nullptr) { set_omega(1); set_freq(0);