From 4ccc7a9bfd0ea46c81b21c906ca19a45377aaad3 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 1 Aug 2026 13:46:46 -0400 Subject: [PATCH] ldpctool: Remove VLA from MinSumCAlgorithm Replace the variable length temporary array in MinSumCAlgorithm::finalp() with a std::vector buffer. This removes reliance on compiler VLA extensions and uses standard C++ storage for the temporary reduction buffer. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/ldpctool/generic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demoddatv/ldpctool/generic.h b/plugins/channelrx/demoddatv/ldpctool/generic.h index 7a6839816..9e53d889d 100644 --- a/plugins/channelrx/demoddatv/ldpctool/generic.h +++ b/plugins/channelrx/demoddatv/ldpctool/generic.h @@ -391,8 +391,8 @@ struct MinSumCAlgorithm } static void finalp(TYPE *links, int cnt) { - TYPE tmp[cnt]; - CODE::exclusive_reduce(links, tmp, cnt, min); + std::vector tmp(cnt); + CODE::exclusive_reduce(links, tmp.data(), cnt, min); for (int i = 0; i < cnt; ++i) links[i] = tmp[i]; }