From ec9f83fa3ea80b0585a63d9a023122d873a55a8e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:46:16 -0400 Subject: [PATCH] dsp: Prevent unsafe copying of UpChannelizer::FilterStage Explicitly delete the copy constructor and copy assignment operator for FilterStage to prevent accidental duplication of its filter state. Copying a filter stage could duplicate internal processing state and resource references, potentially causing incorrect channelization behavior or resource-management problems. Since FilterStage is not intended to be copied or assigned, prohibit both operations at compile time. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/dsp/upchannelizer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/dsp/upchannelizer.h b/sdrbase/dsp/upchannelizer.h index d637a15df..ab04e82ca 100644 --- a/sdrbase/dsp/upchannelizer.h +++ b/sdrbase/dsp/upchannelizer.h @@ -67,6 +67,8 @@ protected: FilterStage(Mode mode); ~FilterStage(); + FilterStage(const FilterStage&) = delete; + FilterStage& operator=(const FilterStage&) = delete; bool work(Sample* sampleIn, Sample *sampleOut) { return (m_filter->*m_workFunction)(sampleIn, sampleOut);