From 1e72e94bb5109c1bd9fa0838b04099e7e2151ba8 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sun, 26 Jul 2026 14:45:38 -0400 Subject: [PATCH] DATV: Replace DVB-S2 SOF VLA buffer with std::vector Replace the variable-length array used for SOF symbol buffering in the DVB-S2 frame receiver with a std::vector allocation. Use vector::data() when passing the buffer to the existing pointer-based conjugate product function. This removes another non-standard VLA usage and improves C++ portability without changing behavior. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/dvbs2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demoddatv/leansdr/dvbs2.h b/plugins/channelrx/demoddatv/leansdr/dvbs2.h index b085442d1..3e091fc4f 100644 --- a/plugins/channelrx/demoddatv/leansdr/dvbs2.h +++ b/plugins/channelrx/demoddatv/leansdr/dvbs2.h @@ -1450,7 +1450,7 @@ struct s2_frame_receiver : runnable { sampler_state ss = *pss; float power = 0; - std::complex symbs[sof.LENGTH]; + std::vector> symbs(sof.LENGTH); for (int i=0; i c = conjprod(sof.symbols, symbs, sof.LENGTH); + std::complex c = conjprod(sof.symbols, symbs.data(), sof.LENGTH); c *= 1.0f / sof.LENGTH; align_phase(pss, c); float signal_amp = sqrtf(power/sof.LENGTH);