From 8f87a67ed6b644ddcc24cb7ef3cee690caba280e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:20:50 -0400 Subject: [PATCH 01/41] ft8: Prevent unsafe copy construction and assignment of FFTEngine Explicitly delete the copy constructor and copy assignment operator for FFTEngine, which owns dynamically allocated FFTBuffers. Allowing the implicitly generated copy operations would result in shallow copies of m_fftBuffers, leaving multiple FFTEngine instances referring to the same resource and potentially causing invalid ownership or double deletion. Since FFTEngine is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- ft8/fft.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ft8/fft.h b/ft8/fft.h index 26c17f24b..af0c9f090 100644 --- a/ft8/fft.h +++ b/ft8/fft.h @@ -49,6 +49,8 @@ public: FFTEngine(); ~FFTEngine(); + FFTEngine(const FFTEngine&) = delete; + FFTEngine& operator=(const FFTEngine&) = delete; private: std::vector> analytic(const std::vector &x); From 637979ca9c1ebc3aac554f6304bba704e126a7c3 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:22:42 -0400 Subject: [PATCH 02/41] chanalyzer: Prevent unsafe copying of resource-owning classes Explicitly delete the copy constructors and copy assignment operators for ChannelAnalyzerSink and its nested RRCHelper class. These classes manage resources that should not be shared through implicit shallow copies. The compiler-generated copy operations could leave multiple objects referring to the same resources, potentially causing invalid ownership or double deletion. Since neither class is intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/chanalyzer/chanalyzersink.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/chanalyzer/chanalyzersink.h b/plugins/channelrx/chanalyzer/chanalyzersink.h index 49c2cfc68..8d3fc8086 100644 --- a/plugins/channelrx/chanalyzer/chanalyzersink.h +++ b/plugins/channelrx/chanalyzer/chanalyzersink.h @@ -40,7 +40,9 @@ class ScopeVis; class ChannelAnalyzerSink : public ChannelSampleSink { public: ChannelAnalyzerSink(); - ~ChannelAnalyzerSink(); + ~ChannelAnalyzerSink(); + ChannelAnalyzerSink(const ChannelAnalyzerSink&) = delete; + ChannelAnalyzerSink& operator=(const ChannelAnalyzerSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); @@ -63,6 +65,8 @@ private: public: RRCHelper(int flen); ~RRCHelper(); + RRCHelper(const RRCHelper&) = delete; + RRCHelper& operator=(const RRCHelper&) = delete; void setUseFFT(bool useFFT); void create(float symbolRate, float rolloff, unsigned int samplesPerSymbol, FIRFilterRRC::Normalization normalization); int runFilt(const std::complex & in, std::complex **out); From 5c1b7fe8ed43196dc19d488c96e9bdacf9842c6a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:23:38 -0400 Subject: [PATCH 03/41] demodadsb: Prevent unsafe copying of Aircraft Explicitly delete the copy constructor and copy assignment operator for Aircraft, which owns dynamically allocated QTableWidgetItem objects. The implicitly generated copy operations could shallow-copy the item pointers, leaving multiple Aircraft instances referring to the same objects and potentially causing invalid ownership or double deletion. Since Aircraft is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodadsb/adsbdemodgui.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.h b/plugins/channelrx/demodadsb/adsbdemodgui.h index 21f78fc8b..8745bc40c 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.h +++ b/plugins/channelrx/demodadsb/adsbdemodgui.h @@ -489,6 +489,8 @@ struct Aircraft { m_staticAirTempItem = new QTableWidgetItem(); m_humidityItem = new QTableWidgetItem(); } + Aircraft(const Aircraft&) = delete; + Aircraft& operator=(const Aircraft&) = delete; QString getImage() const; QString getText(const ADSBDemodSettings *settings, bool all=false) const; From ecf16afde61c5392f8c9aaee2d02482a6757e249 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:24:41 -0400 Subject: [PATCH 04/41] demodam: Prevent unsafe copying of AMDemodSink Explicitly delete the copy constructor and copy assignment operator for AMDemodSink, which manages dynamically allocated memory and other resources. The implicitly generated copy operations could shallow-copy owned resources, leaving multiple AMDemodSink instances referring to the same resources and potentially causing invalid ownership or double deletion. Since AMDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodam/amdemodsink.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodam/amdemodsink.h b/plugins/channelrx/demodam/amdemodsink.h index bc575ec3d..d1e1db192 100644 --- a/plugins/channelrx/demodam/amdemodsink.h +++ b/plugins/channelrx/demodam/amdemodsink.h @@ -38,7 +38,10 @@ class ChannelAPI; class AMDemodSink : public ChannelSampleSink { public: AMDemodSink(); - ~AMDemodSink(); + ~AMDemodSink(); + AMDemodSink(const AMDemodSink&) = delete; + AMDemodSink& operator=(const AMDemodSink&) = delete; + virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 37d3765394faa57f5ce7412901ba11ce927c778d Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:25:15 -0400 Subject: [PATCH 05/41] demodatv: Prevent unsafe copying of ATVDemodSink Explicitly delete the copy constructor and copy assignment operator for ATVDemodSink, which manages dynamically allocated memory and other resources. The implicitly generated copy operations could shallow-copy owned resources, leaving multiple ATVDemodSink instances referring to the same resources and potentially causing invalid ownership or double deletion. Since ATVDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodatv/atvdemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodatv/atvdemodsink.h b/plugins/channelrx/demodatv/atvdemodsink.h index b8bb4770e..911f51048 100644 --- a/plugins/channelrx/demodatv/atvdemodsink.h +++ b/plugins/channelrx/demodatv/atvdemodsink.h @@ -39,7 +39,9 @@ class ScopeVis; class ATVDemodSink : public ChannelSampleSink { public: ATVDemodSink(); - ~ATVDemodSink(); + ~ATVDemodSink(); + ATVDemodSink(const ATVDemodSink&) = delete; + ATVDemodSink& operator=(const ATVDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 5881aed035d310575e9394c8f1f24b0d04d20ca8 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:25:51 -0400 Subject: [PATCH 06/41] demodbfm: Prevent unsafe copying of BFMDemodSink Explicitly delete the copy constructor and copy assignment operator for BFMDemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple BFMDemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since BFMDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodbfm/bfmdemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodbfm/bfmdemodsink.h b/plugins/channelrx/demodbfm/bfmdemodsink.h index a10ee7849..67b553609 100644 --- a/plugins/channelrx/demodbfm/bfmdemodsink.h +++ b/plugins/channelrx/demodbfm/bfmdemodsink.h @@ -44,7 +44,9 @@ class BasebandSampleSink; class BFMDemodSink : public ChannelSampleSink { public: BFMDemodSink(); - ~BFMDemodSink(); + ~BFMDemodSink(); + BFMDemodSink(const BFMDemodSink&) = delete; + BFMDemodSink& operator=(const BFMDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 5d4242b883bb167f8b64769d1257ab498ed49a27 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:26:22 -0400 Subject: [PATCH 07/41] demoddatv: Prevent unsafe copying of DATVDemodSink Explicitly delete the copy constructor and copy assignment operator for DATVDemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple DATVDemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since DATVDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/datvdemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demoddatv/datvdemodsink.h b/plugins/channelrx/demoddatv/datvdemodsink.h index d4a255421..853bee9cf 100644 --- a/plugins/channelrx/demoddatv/datvdemodsink.h +++ b/plugins/channelrx/demoddatv/datvdemodsink.h @@ -57,7 +57,9 @@ class QLabel; class DATVDemodSink : public ChannelSampleSink { public: DATVDemodSink(); - ~DATVDemodSink(); + ~DATVDemodSink(); + DATVDemodSink(const DATVDemodSink&) = delete; + DATVDemodSink& operator=(const DATVDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 6e8d1efb76c80ee3d57f900666288553ec8888ef Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:27:00 -0400 Subject: [PATCH 08/41] demoddatv/leansdr: Prevent unsafe copying of bch_engine Explicitly delete the copy constructor and copy assignment operator for bch_engine, which owns dynamically allocated arrays released by its destructor. The implicitly generated copy operations would shallow-copy the array pointers, leaving multiple bch_engine instances referring to the same allocations and potentially causing double deletion. Since bch_engine is not intended to be copied or assigned, prohibit both operations at compile time, preventing unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/bch.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/bch.h b/plugins/channelrx/demoddatv/leansdr/bch.h index 1b9cd38e9..afe136d0b 100644 --- a/plugins/channelrx/demoddatv/leansdr/bch.h +++ b/plugins/channelrx/demoddatv/leansdr/bch.h @@ -95,6 +95,8 @@ struct bch_engine : bch_interface delete[] truncpolys; delete[] syndpolys; } + bch_engine(const bch_engine&) = delete; + bch_engine& operator=(const bch_engine&) = delete; // Generate BCH parity bits. From 4a802fe9ebd5b535c4354f74cd8cd9f3916d8eed Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:27:56 -0400 Subject: [PATCH 09/41] demoddatv/leansdr: Prevent unsafe copying of FIR processing classes Explicitly delete the copy constructors and copy assignment operators for fir_filter and fir_resampler, both of which own dynamically allocated coefficient arrays released by their destructors. The implicitly generated copy operations would shallow-copy the coefficient pointers, leaving multiple instances referring to the same allocations and potentially causing double deletion. Since neither class is intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/dsp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/dsp.h b/plugins/channelrx/demoddatv/leansdr/dsp.h index 77d985cd3..739e8b595 100644 --- a/plugins/channelrx/demoddatv/leansdr/dsp.h +++ b/plugins/channelrx/demoddatv/leansdr/dsp.h @@ -408,6 +408,8 @@ struct fir_filter : runnable ~fir_filter() { delete[] shifted_coeffs; } + fir_filter(const fir_filter&) = delete; + fir_filter& operator=(const fir_filter&) = delete; void run() { @@ -506,6 +508,9 @@ struct fir_resampler : runnable delete[] shifted_coeffs; } + fir_resampler(const fir_resampler&) = delete; + fir_resampler& operator=(const fir_resampler&) = delete; + void run() { if (in.readable() < ncoeffs) From 84be22482807f93353a2c363ddeeb21e653818c9 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:28:34 -0400 Subject: [PATCH 10/41] demoddatv/leansdr: Prevent unsafe copying of DVB synchronization classes Explicitly delete the copy constructors and copy assignment operators for deconvol_sync and viterbi_sync, which manage resources that should not be shared through implicit shallow copies. For deconvol_sync, the implicitly generated copy operations would shallow-copy the punct and conv pointers, potentially causing double deletion. Prohibit copying and assignment for both classes to prevent unsafe resource ownership. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/dvb.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/dvb.h b/plugins/channelrx/demoddatv/leansdr/dvb.h index ed3457cb8..9ef342e95 100644 --- a/plugins/channelrx/demoddatv/leansdr/dvb.h +++ b/plugins/channelrx/demoddatv/leansdr/dvb.h @@ -181,6 +181,8 @@ struct deconvol_sync : runnable delete[] punct; delete[] conv; } + deconvol_sync(const deconvol_sync&) = delete; + deconvol_sync& operator=(const deconvol_sync&) = delete; typedef uint64_t signal_t; typedef uint64_t iq_t; @@ -1749,6 +1751,9 @@ struct viterbi_sync : runnable delete syncs; } + viterbi_sync(const viterbi_sync&) = delete; + viterbi_sync& operator=(const viterbi_sync&) = delete; + TCS *init_map(bool conj, float angle) { // Each constellation has its own pattern for labels. From cdeaf71f6db4985b87791c7c7a48fe6dc73683e2 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:29:11 -0400 Subject: [PATCH 11/41] demoddatv/leansdr: Prevent unsafe copying of DVB-S2 processing classes Explicitly delete the copy constructors and copy assignment operators for s2_frame_receiver and s2_fecdec_soft. These processing classes manage state and resources that should not be duplicated through implicit shallow copies. Prohibiting copying and assignment prevents accidental duplication of internal state and potentially unsafe resource ownership. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/dvbs2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/dvbs2.h b/plugins/channelrx/demoddatv/leansdr/dvbs2.h index 78865401e..26b6d9ca7 100644 --- a/plugins/channelrx/demoddatv/leansdr/dvbs2.h +++ b/plugins/channelrx/demoddatv/leansdr/dvbs2.h @@ -675,6 +675,9 @@ struct s2_frame_receiver : runnable } } + s2_frame_receiver(const s2_frame_receiver&) = delete; + s2_frame_receiver& operator=(const s2_frame_receiver&) = delete; + enum { FRAME_DETECT, // Looking for PLHEADER FRAME_PROBE, // Aligned with PLHEADER, ready to recover carrier @@ -3136,6 +3139,9 @@ struct s2_fecdec_soft : runnable } } + s2_fecdec_soft(const s2_fecdec_soft&) = delete; + s2_fecdec_soft& operator=(const s2_fecdec_soft&) = delete; + void run() { while (in.readable() >= 1 && From a30de71fa1e347531121cb893253e21bc1de3447 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:29:51 -0400 Subject: [PATCH 12/41] demoddatv/leansdr: Prevent unsafe copying of pipebuf Explicitly delete the copy constructor and copy assignment operator for pipebuf, which owns a dynamically allocated buffer released by its destructor. The implicitly generated copy operations would shallow-copy the buffer pointer, leaving multiple pipebuf instances referring to the same allocation and potentially causing double deletion. Since pipebuf is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/framework.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/framework.h b/plugins/channelrx/demoddatv/leansdr/framework.h index e76965359..68dbbeb58 100644 --- a/plugins/channelrx/demoddatv/leansdr/framework.h +++ b/plugins/channelrx/demoddatv/leansdr/framework.h @@ -248,6 +248,9 @@ struct pipebuf : pipebuf_common delete[] buf; } + pipebuf(const pipebuf&) = delete; + pipebuf& operator=(const pipebuf&) = delete; + int sizeofT() { return sizeof(T); } From 33efaf5b74161f357ebd9337433d62fa3cc84736 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:30:40 -0400 Subject: [PATCH 13/41] demoddatv/leansdr: Prevent unsafe copying of hdlc_dec Explicitly delete the copy constructor and copy assignment operator for hdlc_dec, which owns a dynamically allocated frame buffer released by its destructor. The implicitly generated copy operations would shallow-copy the framebuf pointer, leaving multiple hdlc_dec instances referring to the same allocation and potentially causing double deletion. Since hdlc_dec is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/hdlc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/hdlc.h b/plugins/channelrx/demoddatv/leansdr/hdlc.h index 065583391..52e448ef5 100644 --- a/plugins/channelrx/demoddatv/leansdr/hdlc.h +++ b/plugins/channelrx/demoddatv/leansdr/hdlc.h @@ -55,6 +55,9 @@ struct hdlc_dec delete[] framebuf; } + hdlc_dec(const hdlc_dec&) = delete; + hdlc_dec& operator=(const hdlc_dec&) = delete; + void reset() { shiftreg = 0; From 6b5eed5590d8992b0b58b94a4f6db2122b2f4507 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:31:22 -0400 Subject: [PATCH 14/41] demoddatv/leansdr: Prevent unsafe copying of ldpc_engine Explicitly delete the copy constructor and copy assignment operator for ldpc_engine, which manages resources that should not be duplicated through implicit shallow copies. The implicitly generated copy operations could duplicate internal resource pointers, potentially leaving multiple ldpc_engine instances referring to the same resources and causing invalid ownership or double deletion. Since ldpc_engine is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/ldpc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/ldpc.h b/plugins/channelrx/demoddatv/leansdr/ldpc.h index d81bcb42d..1fc976c60 100644 --- a/plugins/channelrx/demoddatv/leansdr/ldpc.h +++ b/plugins/channelrx/demoddatv/leansdr/ldpc.h @@ -175,6 +175,9 @@ struct ldpc_engine } } + ldpc_engine(const ldpc_engine&) = delete; + ldpc_engine& operator=(const ldpc_engine&) = delete; + void print_node_stats() { int nedges = count_edges(vnodes, k); From 71c0e73e9d109f40e6e47e501f6f2c2d65b1665e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:32:00 -0400 Subject: [PATCH 15/41] demoddatv/leansdr: Prevent unsafe copying of SDR processing classes Explicitly delete the copy constructors and copy assignment operators for auto_notch and fir_sampler, both of which own dynamically allocated arrays released by their destructors. The implicitly generated copy operations would shallow-copy the array pointers, leaving multiple instances referring to the same allocations and potentially causing double deletion. Since neither class is intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructors and assignment operators with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddatv/leansdr/sdr.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/channelrx/demoddatv/leansdr/sdr.h b/plugins/channelrx/demoddatv/leansdr/sdr.h index 7ef259f84..ce425ad5b 100644 --- a/plugins/channelrx/demoddatv/leansdr/sdr.h +++ b/plugins/channelrx/demoddatv/leansdr/sdr.h @@ -91,6 +91,9 @@ struct auto_notch : runnable delete[] __slots; } + auto_notch(const auto_notch&) = delete; + auto_notch& operator=(const auto_notch&) = delete; + void run() { while (in.readable() >= fft.size() && out.writable() >= fft.size()) @@ -1052,6 +1055,9 @@ struct fir_sampler : sampler_interface delete[] shifted_coeffs; } + fir_sampler(const fir_sampler&) = delete; + fir_sampler& operator=(const fir_sampler&) = delete; + int readahead() { return ncoeffs - 1; } From e466899d9d0cf501b032a78245b558fee3f1c546 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:32:30 -0400 Subject: [PATCH 16/41] demoddsd: Prevent unsafe copying of DSDDemodSink Explicitly delete the copy constructor and copy assignment operator for DSDDemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple DSDDemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since DSDDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demoddsd/dsddemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demoddsd/dsddemodsink.h b/plugins/channelrx/demoddsd/dsddemodsink.h index 533a2fe39..a9b07fc83 100644 --- a/plugins/channelrx/demoddsd/dsddemodsink.h +++ b/plugins/channelrx/demoddsd/dsddemodsink.h @@ -41,7 +41,9 @@ class Feature; class DSDDemodSink : public ChannelSampleSink { public: DSDDemodSink(); - ~DSDDemodSink(); + ~DSDDemodSink(); + DSDDemodSink(const DSDDemodSink&) = delete; + DSDDemodSink& operator=(const DSDDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 192c87b7cda8f7a5f1d270ca586de8fc6fd8da8e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:33:08 -0400 Subject: [PATCH 17/41] demodft8: Prevent unsafe copying of FT8DemodSink Explicitly delete the copy constructor and copy assignment operator for FT8DemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple FT8DemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since FT8DemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodft8/ft8demodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodft8/ft8demodsink.h b/plugins/channelrx/demodft8/ft8demodsink.h index d5c5e58e4..d54a2bf7f 100644 --- a/plugins/channelrx/demodft8/ft8demodsink.h +++ b/plugins/channelrx/demodft8/ft8demodsink.h @@ -35,7 +35,9 @@ class FT8Buffer; class FT8DemodSink : public ChannelSampleSink { public: FT8DemodSink(); - ~FT8DemodSink(); + ~FT8DemodSink(); + FT8DemodSink(const FT8DemodSink&) = delete; + FT8DemodSink& operator=(const FT8DemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 1e5c7a4c1a694470902e465547505cedd3befa95 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:33:31 -0400 Subject: [PATCH 18/41] demodssb: Prevent unsafe copying of SSBDemodSink Explicitly delete the copy constructor and copy assignment operator for SSBDemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple SSBDemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since SSBDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodssb/ssbdemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodssb/ssbdemodsink.h b/plugins/channelrx/demodssb/ssbdemodsink.h index 28ee4c37c..cbe2bc3fe 100644 --- a/plugins/channelrx/demodssb/ssbdemodsink.h +++ b/plugins/channelrx/demodssb/ssbdemodsink.h @@ -37,7 +37,9 @@ class ChannelAPI; class SSBDemodSink : public ChannelSampleSink { public: SSBDemodSink(); - ~SSBDemodSink(); + ~SSBDemodSink(); + SSBDemodSink(const SSBDemodSink&) = delete; + SSBDemodSink& operator=(const SSBDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From ca0ef1702eedf263a30cbfbb186440b9fec7d305 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:34:42 -0400 Subject: [PATCH 19/41] demodwfm: Prevent unsafe copying of WFMDemodSink Explicitly delete the copy constructor and copy assignment operator for WFMDemodSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple WFMDemodSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since WFMDemodSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/demodwfm/wfmdemodsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demodwfm/wfmdemodsink.h b/plugins/channelrx/demodwfm/wfmdemodsink.h index 48098408f..38ae5db12 100644 --- a/plugins/channelrx/demodwfm/wfmdemodsink.h +++ b/plugins/channelrx/demodwfm/wfmdemodsink.h @@ -35,7 +35,9 @@ class ChannelAPI; class WFMDemodSink : public ChannelSampleSink { public: WFMDemodSink(); - ~WFMDemodSink(); + ~WFMDemodSink(); + WFMDemodSink(const WFMDemodSink&) = delete; + WFMDemodSink& operator=(const WFMDemodSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 84fbb4d761cec73121778086758f16aba5cd673d Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:35:35 -0400 Subject: [PATCH 20/41] filesink: Prevent unsafe copying of FileSinkSink Explicitly delete the copy constructor and copy assignment operator for FileSinkSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple FileSinkSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since FileSinkSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/filesink/filesinksink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/filesink/filesinksink.h b/plugins/channelrx/filesink/filesinksink.h index 65835ebb7..3399dc70f 100644 --- a/plugins/channelrx/filesink/filesinksink.h +++ b/plugins/channelrx/filesink/filesinksink.h @@ -35,7 +35,9 @@ class SpectrumVis; class FileSinkSink : public ChannelSampleSink { public: FileSinkSink(); - ~FileSinkSink(); + ~FileSinkSink(); + FileSinkSink(const FileSinkSink&) = delete; + FileSinkSink& operator=(const FileSinkSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From b613d3d2135d43237fca8c2ecf508e0fa25b4891 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:36:21 -0400 Subject: [PATCH 21/41] wdsprx: Prevent unsafe copying of WDSPRxSink Explicitly delete the copy constructor and copy assignment operator for WDSPRxSink, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple WDSPRxSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since WDSPRxSink is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channelrx/wdsprx/wdsprxsink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/wdsprx/wdsprxsink.h b/plugins/channelrx/wdsprx/wdsprxsink.h index b7f447d00..93ee2fff8 100644 --- a/plugins/channelrx/wdsprx/wdsprxsink.h +++ b/plugins/channelrx/wdsprx/wdsprxsink.h @@ -42,7 +42,9 @@ namespace WDSP { class WDSPRxSink : public ChannelSampleSink { public: WDSPRxSink(); - ~WDSPRxSink(); + ~WDSPRxSink(); + WDSPRxSink(const WDSPRxSink&) = delete; + WDSPRxSink& operator=(const WDSPRxSink&) = delete; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end); From 04af7409648f2f775a76a54567a5b60996629d4c Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:36:49 -0400 Subject: [PATCH 22/41] modatv: Prevent unsafe copying of ATVModSource Explicitly delete the copy constructor and copy assignment operator for ATVModSource, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple ATVModSource instances referring to the same resources, potentially causing invalid ownership or double deletion. Since ATVModSource is not intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channeltx/modatv/atvmodsource.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/channeltx/modatv/atvmodsource.h b/plugins/channeltx/modatv/atvmodsource.h index 74e79e42f..4c3b6cb1f 100644 --- a/plugins/channeltx/modatv/atvmodsource.h +++ b/plugins/channeltx/modatv/atvmodsource.h @@ -46,6 +46,9 @@ class ATVModSource : public ChannelSampleSource public: ATVModSource(); ~ATVModSource(); + ATVModSource(const ATVModSource&) = delete; + ATVModSource& operator=(const ATVModSource&) = delete; + virtual void pull(SampleVector::iterator begin, unsigned int nbSamples); virtual void pullOne(Sample& sample); From 31c4f2b380b2ca14d358469ed423167cd004bfff Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:37:31 -0400 Subject: [PATCH 23/41] moddatv/dvb-s: Prevent unsafe copying of DVBS Explicitly delete the copy constructor and copy assignment operator for DVBS, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple DVBS instances referring to the same resources, potentially causing invalid ownership or double deletion. Since DVBS is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channeltx/moddatv/dvb-s/dvb-s.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/channeltx/moddatv/dvb-s/dvb-s.h b/plugins/channeltx/moddatv/dvb-s/dvb-s.h index 54cfc906d..e1e5ef38c 100644 --- a/plugins/channeltx/moddatv/dvb-s/dvb-s.h +++ b/plugins/channeltx/moddatv/dvb-s/dvb-s.h @@ -36,6 +36,8 @@ public: DVBS(); ~DVBS(); + DVBS(const DVBS&) = delete; + DVBS& operator=(const DVBS&) = delete; int encode(const uint8_t *ts, uint8_t *iq); void setCodeRate(CodeRate codeRate); From 3a10e38b1efe2963e2ab9eb8d44fecd4fab07f88 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:38:18 -0400 Subject: [PATCH 24/41] udpsource: Prevent unsafe copying of UDPSourceSource Explicitly delete the copy constructor and copy assignment operator for UDPSourceSource, which manages resources that should not be shared through implicit shallow copies. The implicitly generated copy operations could leave multiple UDPSourceSource instances referring to the same resources, potentially causing invalid ownership or double deletion. Since UDPSourceSource is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- plugins/channeltx/udpsource/udpsourcesource.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/channeltx/udpsource/udpsourcesource.h b/plugins/channeltx/udpsource/udpsourcesource.h index 9fb6443b7..4f6f6c0d4 100644 --- a/plugins/channeltx/udpsource/udpsourcesource.h +++ b/plugins/channeltx/udpsource/udpsourcesource.h @@ -37,6 +37,8 @@ class UDPSourceSource : public ChannelSampleSource { public: UDPSourceSource(); virtual ~UDPSourceSource(); + UDPSourceSource(const UDPSourceSource&) = delete; + UDPSourceSource& operator=(const UDPSourceSource&) = delete; virtual void pull(SampleVector::iterator begin, unsigned int nbSamples); virtual void pullOne(Sample& sample); From 5155e9e8f38920b2c57c4dd2443fc4b49613d253 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:39:00 -0400 Subject: [PATCH 25/41] qrtplib: Prevent unsafe copying of RTPRawPacket Explicitly delete the copy constructor and copy assignment operator for RTPRawPacket, which represents a received packet and manages resources that should not be duplicated through implicit shallow copies. The implicitly generated copy operations could duplicate internal pointers, leaving multiple RTPRawPacket instances referring to the same resources and potentially causing invalid ownership or double deletion. Since RTPRawPacket is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- qrtplib/rtprawpacket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qrtplib/rtprawpacket.h b/qrtplib/rtprawpacket.h index 82ef6d66b..1fea29e65 100644 --- a/qrtplib/rtprawpacket.h +++ b/qrtplib/rtprawpacket.h @@ -58,6 +58,8 @@ public: */ RTPRawPacket(const uint8_t *data, std::size_t datalen, const RTPAddress& address, RTPTime &recvtime, bool rtp); ~RTPRawPacket(); + RTPRawPacket(const RTPRawPacket&) = delete; + RTPRawPacket& operator=(const RTPRawPacket&) = delete; /** Returns the pointer to the data which is contained in this packet. */ uint8_t *GetData() From 74daccaa817654bd45d8e8e32d26684cfee46be1 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:39:36 -0400 Subject: [PATCH 26/41] audio: Prevent unsafe copying of AudioNetSink Explicitly delete the copy constructor and copy assignment operator for AudioNetSink, which manages audio output and network resources that should not be duplicated through implicit shallow copies. The implicitly generated copy operations could leave multiple AudioNetSink instances referring to the same resources, potentially causing invalid ownership or double deletion. Since AudioNetSink is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe resource ownership. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/audio/audionetsink.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/audio/audionetsink.h b/sdrbase/audio/audionetsink.h index 3e5be2b67..454b4099c 100644 --- a/sdrbase/audio/audionetsink.h +++ b/sdrbase/audio/audionetsink.h @@ -55,6 +55,8 @@ public: AudioNetSink(QObject *parent); //!< without RTP AudioNetSink(QObject *parent, int sampleRate, bool stereo); //!< with RTP ~AudioNetSink(); + AudioNetSink(const AudioNetSink&) = delete; + AudioNetSink& operator=(const AudioNetSink&) = delete; void setDestination(const QString& address, uint16_t port); void addDestination(const QString& address, uint16_t port); From 0271805b5499ddab28179a310f2eb60e6a8eb76b Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:40:08 -0400 Subject: [PATCH 27/41] channel: Prevent unsafe copying of RemoteDataFrame Delete the copy constructor and copy assignment operator to prevent shallow copies of the dynamically allocated m_superBlocks array, which could lead to double deletion. Add a move constructor that transfers ownership of m_superBlocks and nulls the source pointer, allowing std::vector to relocate elements safely during resize. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/channel/remotedatablock.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sdrbase/channel/remotedatablock.h b/sdrbase/channel/remotedatablock.h index e7f0af27b..38c8a835a 100644 --- a/sdrbase/channel/remotedatablock.h +++ b/sdrbase/channel/remotedatablock.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "dsp/dsptypes.h" #define UDPSINKFEC_UDPSIZE 512 @@ -170,6 +171,15 @@ public: ~RemoteDataFrame() { delete[] m_superBlocks; } + RemoteDataFrame(const RemoteDataFrame&) = delete; + RemoteDataFrame& operator=(const RemoteDataFrame&) = delete; + RemoteDataFrame(RemoteDataFrame&& other) : + m_txControlBlock(std::move(other.m_txControlBlock)), + m_rxControlBlock(std::move(other.m_rxControlBlock)), + m_superBlocks(other.m_superBlocks) + { + other.m_superBlocks = nullptr; + } RemoteTxControlBlock m_txControlBlock; RemoteRxControlBlock m_rxControlBlock; RemoteSuperBlock *m_superBlocks; From a2c35b0b97fd5eb3f7111e44b96bb699ed31b941 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:40:43 -0400 Subject: [PATCH 28/41] device: Prevent unsafe copying of DeviceSet Explicitly delete the copy constructor and copy assignment operator for DeviceSet, which manages device and channel state that should not be duplicated through implicit shallow copies. The implicitly generated copy operations could duplicate internal state and resource references, potentially causing inconsistent device state or invalid resource ownership. Since DeviceSet is not intended to be copied or assigned, prohibit both operations at compile time to prevent unsafe duplication. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/device/deviceset.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/device/deviceset.h b/sdrbase/device/deviceset.h index 09596a252..074d09f71 100644 --- a/sdrbase/device/deviceset.h +++ b/sdrbase/device/deviceset.h @@ -56,6 +56,8 @@ public: DeviceSet(int tabIndex, int deviceType); ~DeviceSet(); + DeviceSet(const DeviceSet&) = delete; + DeviceSet& operator=(const DeviceSet&) = delete; int getNumberOfChannels() const { return m_channelInstanceRegistrations.size(); } int getIndex() const { return m_deviceTabIndex; } From a4d501c9f3dd249214c100593a325371aa821c1d Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:41:22 -0400 Subject: [PATCH 29/41] dsp: Prevent unsafe copying of AFSquelch Explicitly delete the copy constructor and copy assignment operator for AFSquelch to prevent accidental duplication of its DSP state. The implicitly generated copy operations could duplicate internal filter state and coefficients, potentially causing unintended behavior if the instances are expected to maintain independent processing state. Since AFSquelch 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/afsquelch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdrbase/dsp/afsquelch.h b/sdrbase/dsp/afsquelch.h index 59c88ca66..894e2a438 100644 --- a/sdrbase/dsp/afsquelch.h +++ b/sdrbase/dsp/afsquelch.h @@ -27,8 +27,10 @@ class SDRBASE_API AFSquelch { public: // constructor with default values - AFSquelch(); + AFSquelch(); virtual ~AFSquelch(); + AFSquelch(const AFSquelch&) = delete; + AFSquelch& operator=(const AFSquelch&) = delete; // setup the basic parameters and coefficients void setCoefficients( From fe66e6d0e109b7b13df7a9b0917262b19e983d92 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:42:15 -0400 Subject: [PATCH 30/41] dsp: Prevent unsafe copying of CTCSSDetector Explicitly delete the copy constructor and copy assignment operator for CTCSSDetector to prevent accidental duplication of its detector state. Copying could duplicate internal detection state and coefficients, leading to unintended behavior if instances are expected to maintain independent processing state. Since CTCSSDetector 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/ctcssdetector.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/dsp/ctcssdetector.h b/sdrbase/dsp/ctcssdetector.h index d2304c0bf..a4510d99b 100644 --- a/sdrbase/dsp/ctcssdetector.h +++ b/sdrbase/dsp/ctcssdetector.h @@ -32,6 +32,8 @@ class SDRBASE_API CTCSSDetector { public: CTCSSDetector(); virtual ~CTCSSDetector(); + CTCSSDetector(const CTCSSDetector&) = delete; + CTCSSDetector& operator=(const CTCSSDetector&) = delete; // setup the basic parameters and coefficients void setCoefficients( From 21429a37873345e1156ae6b7a98f65036f5b7592 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:43:04 -0400 Subject: [PATCH 31/41] dsp: Prevent unsafe copying of DownChannelizer::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 resources, 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/downchannelizer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/dsp/downchannelizer.h b/sdrbase/dsp/downchannelizer.h index 5072f60dd..496e6a7ae 100644 --- a/sdrbase/dsp/downchannelizer.h +++ b/sdrbase/dsp/downchannelizer.h @@ -66,6 +66,8 @@ protected: FilterStage(Mode mode); ~FilterStage(); + FilterStage(const FilterStage&) = delete; + FilterStage& operator=(const FilterStage&) = delete; bool work(Sample* sample) { From 1afb41480be78297c03c843af75268d485fe715f Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:43:56 -0400 Subject: [PATCH 32/41] dsp: Prevent unsafe copying of sfft Explicitly delete the copy constructor and copy assignment operator for sfft to prevent accidental duplication of FFT processing state. Copying an FFT instance could duplicate internal state or resource references, potentially causing incorrect processing or resource-management problems. Since sfft 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/fftfilt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/dsp/fftfilt.h b/sdrbase/dsp/fftfilt.h index 09a0901b5..9635d46ba 100644 --- a/sdrbase/dsp/fftfilt.h +++ b/sdrbase/dsp/fftfilt.h @@ -136,6 +136,8 @@ public: typedef std::complex cmplx; sfft(int len); ~sfft(); + sfft(const sfft&) = delete; + sfft& operator=(const sfft&) = delete; void run(const cmplx& input); void fetch(float *result); private: From a60c7b309d77cad97cd2041a7682b491d6269a1a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:44:28 -0400 Subject: [PATCH 33/41] dsp: Prevent unsafe copying of FFTNoiseReduction Explicitly delete the copy constructor and copy assignment operator for FFTNoiseReduction to prevent accidental duplication of its noise-reduction state. Copying an FFTNoiseReduction instance could duplicate internal processing state or resource references, potentially causing incorrect behavior or resource-management problems. Since FFTNoiseReduction 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/fftnr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdrbase/dsp/fftnr.h b/sdrbase/dsp/fftnr.h index d11f5c408..0fb18ea39 100644 --- a/sdrbase/dsp/fftnr.h +++ b/sdrbase/dsp/fftnr.h @@ -35,6 +35,8 @@ public: FFTNoiseReduction(int len); ~FFTNoiseReduction(); + FFTNoiseReduction(const FFTNoiseReduction&) = delete; + FFTNoiseReduction& operator=(const FFTNoiseReduction&) = delete; void init(); //!< call before start of initial FFT scan void push(cmplx data, int index); //!< Push FFT bin during initial FFT scan From 00bbb81a2b533990a6cfae85c81511de2dc37fea Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:45:29 -0400 Subject: [PATCH 34/41] dsp: Prevent unsafe copying of IIRFilter Explicitly delete the copy constructor and copy assignment operator for IIRFilter to prevent accidental duplication of filter state. Copying an IIRFilter instance could duplicate internal filter state and coefficient references, potentially causing incorrect processing or resource-management problems. Since IIRFilter 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/iirfilter.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdrbase/dsp/iirfilter.h b/sdrbase/dsp/iirfilter.h index 8734a6592..5164c2420 100644 --- a/sdrbase/dsp/iirfilter.h +++ b/sdrbase/dsp/iirfilter.h @@ -31,6 +31,8 @@ template class IIRFilter public: IIRFilter(const Type *a, const Type *b); ~IIRFilter(); + IIRFilter(const IIRFilter&) = delete; + IIRFilter& operator=(const IIRFilter&) = delete; void setCoeffs(const Type *a, const Type *b); Type run(const Type& sample); @@ -46,6 +48,8 @@ template class IIRFilter public: IIRFilter(const Type *a, const Type *b); ~IIRFilter(); + IIRFilter(const IIRFilter&) = delete; + IIRFilter& operator=(const IIRFilter&) = delete; void setCoeffs(const Type *a, const Type *b); Type run(const Type& sample); From ec9f83fa3ea80b0585a63d9a023122d873a55a8e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:46:16 -0400 Subject: [PATCH 35/41] 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); From 31ee803659cc23304fe88eef429a69671abc3709 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:46:53 -0400 Subject: [PATCH 36/41] util: Prevent unsafe copying of DoubleBufferFIFO Explicitly delete the copy constructor and copy assignment operator for DoubleBufferFIFO to prevent accidental duplication of its data buffer. The destructor deletes m_data with delete[]. A shallow copy would cause multiple instances to own the same buffer, potentially resulting in double deletion and memory corruption. Since DoubleBufferFIFO manages its buffer directly, prohibit copying and assignment at compile time. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/util/doublebufferfifo.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdrbase/util/doublebufferfifo.h b/sdrbase/util/doublebufferfifo.h index d4a68faf2..5cf59df9d 100644 --- a/sdrbase/util/doublebufferfifo.h +++ b/sdrbase/util/doublebufferfifo.h @@ -35,6 +35,9 @@ public: delete[] m_data; } + DoubleBufferFIFO(const DoubleBufferFIFO&) = delete; + DoubleBufferFIFO& operator=(const DoubleBufferFIFO&) = delete; + void resize(int size) { delete[] m_data; From 84b8ac40d695654f937924a317d425606190e75e Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:47:35 -0400 Subject: [PATCH 37/41] util: Prevent unsafe copying of UDPSinkUtil Explicitly delete the copy constructor and copy assignment operator for UDPSinkUtil to prevent accidental duplication of its socket ownership. The destructor deletes m_socket. A shallow copy would leave multiple instances referencing the same socket, potentially causing double deletion and invalid socket access. Since UDPSinkUtil owns its socket, prohibit copying and assignment at compile time. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrbase/util/udpsinkutil.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdrbase/util/udpsinkutil.h b/sdrbase/util/udpsinkutil.h index aedbc2bc0..0648813cd 100644 --- a/sdrbase/util/udpsinkutil.h +++ b/sdrbase/util/udpsinkutil.h @@ -68,6 +68,9 @@ public: delete m_socket; } + UDPSinkUtil(const UDPSinkUtil&) = delete; + UDPSinkUtil& operator=(const UDPSinkUtil&) = delete; + void moveToThread(QThread *thread) { m_socket->moveToThread(thread); From 0706416d6208b96c74ec3a230f49faf902bb199b Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:48:17 -0400 Subject: [PATCH 38/41] gui: Prevent unsafe copying of TVScreenAnalogBuffer Explicitly delete the copy constructor and copy assignment operator for TVScreenAnalogBuffer to prevent accidental duplication of its buffer. The destructor deletes m_outOfBoundsLine with delete[]. A shallow copy would cause multiple instances to own the same array, potentially resulting in double deletion and memory corruption. Since TVScreenAnalogBuffer manages this buffer directly, prohibit copying and assignment at compile time. cppcheck identified the missing copy constructor and assignment operator with its noCopyConstructor and noOperatorEq warnings. Signed-off-by: Robin Getz --- sdrgui/gui/tvscreenanalog.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdrgui/gui/tvscreenanalog.h b/sdrgui/gui/tvscreenanalog.h index a9ced2117..357bd824d 100644 --- a/sdrgui/gui/tvscreenanalog.h +++ b/sdrgui/gui/tvscreenanalog.h @@ -62,6 +62,9 @@ public: delete[] m_outOfBoundsLine; } + TVScreenAnalogBuffer(const TVScreenAnalogBuffer&) = delete; + TVScreenAnalogBuffer& operator=(const TVScreenAnalogBuffer&) = delete; + int getWidth() { return m_width; From 6059728a16151f958af38f9dd8588a6fc6b4c131 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 9 Oct 2026 16:49:08 -0400 Subject: [PATCH 39/41] wdsp/unit: Prevent unsafe copying of Unit Explicitly delete the copy constructor and copy assignment operator for Unit to prevent accidental duplication of DSP processing state. Copying a Unit instance could duplicate internal buffer and processing state, potentially causing incorrect DSP behavior or resource-management problems. Since Unit 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 --- wdsp/unit.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wdsp/unit.hpp b/wdsp/unit.hpp index a60844ddc..144c6f938 100644 --- a/wdsp/unit.hpp +++ b/wdsp/unit.hpp @@ -50,6 +50,9 @@ public: int _dsp_size // number complex samples processed per buffer in mainstream dsp processing ); ~Unit(); + Unit(const Unit&) = delete; + Unit& operator=(const Unit&) = delete; + void flushBuffers(); void setBuffersInputSamplerate(int _in_rate); From e923bf2f32d2a65bbbf22be08491a7c35a075951 Mon Sep 17 00:00:00 2001 From: jvn314 Date: Sat, 10 Oct 2026 20:40:23 -0500 Subject: [PATCH 40/41] Meshtasticdemod: calculate carrier frequency offset --- plugins/channelrx/demodmeshtastic/meshtasticdemodmsg.h | 10 ++++++++++ .../channelrx/demodmeshtastic/meshtasticdemodsink.cpp | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodmsg.h b/plugins/channelrx/demodmeshtastic/meshtasticdemodmsg.h index 36020fb94..0feba34db 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodmsg.h +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodmsg.h @@ -40,6 +40,9 @@ namespace MeshtasticDemodMsg unsigned int getSyncWord() const { return m_syncWord; } float getSingalDb() const { return m_signalDb; } float getNoiseDb() const { return m_noiseDb; } + // Access the carrier frequency offset in Hz carried by this message. + double getCfoHz() const { return m_cfoHz; } + void setCfoHz(double cfoHz) { m_cfoHz = cfoHz; } void pushBackSymbol(unsigned short symbol) { m_symbols.push_back(symbol); @@ -93,6 +96,8 @@ namespace MeshtasticDemodMsg unsigned int m_syncWord; float m_signalDb; float m_noiseDb; + // Initialize the carrier frequency offset in Hz for every new message. + double m_cfoHz = 0.0; MsgDecodeSymbols() : //!< create an empty message Message(), @@ -259,6 +264,9 @@ namespace MeshtasticDemodMsg unsigned int getSyncWord() const { return m_syncWord; } float getSingalDb() const { return m_signalDb; } float getNoiseDb() const { return m_noiseDb; } + // Access the carrier frequency offset in Hz carried by this message. + double getCfoHz() const { return m_cfoHz; } + void setCfoHz(double cfoHz) { m_cfoHz = cfoHz; } const QString& getMsgTimestamp() const { return m_msgTimestamp; } unsigned int getPacketSize() const { return m_packetSize; } unsigned int getNbParityBits() const { return m_nbParityBits; } @@ -338,6 +346,8 @@ namespace MeshtasticDemodMsg unsigned int m_syncWord; float m_signalDb; float m_noiseDb; + // Initialize the carrier frequency offset in Hz for every new message. + double m_cfoHz = 0.0; QString m_msgTimestamp; unsigned int m_packetSize; unsigned int m_nbParityBits; diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp index 8430e8cd1..f2ae65498 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp @@ -1019,6 +1019,11 @@ int MeshtasticDemodSink::processLoRaFrameSyncStep() m_loRaCFOInt = static_cast(std::floor((m_loRaDownVal - static_cast(m_nbSymbols)) / 2.0)); } + // Convert the carrier frequency offset (CFO) estimate from FFT bins to Hz. + const double cfoHz = + (static_cast(m_loRaCFOInt) + static_cast(m_loRaCFOFrac)) + * static_cast(m_bandwidth) / static_cast(m_nbSymbols); + // Preserve state-machine net ID bin indices for sync word extraction. // The corrLen-based refinement overwrites m_loRaNetIds but may produce // incorrect results when m_loRaNetIdSamp is not fully populated. @@ -1140,6 +1145,8 @@ int MeshtasticDemodSink::processLoRaFrameSyncStep() m_loRaFrameId++; m_decodeMsg = MeshtasticDemodMsg::MsgDecodeSymbols::create(); m_decodeMsg->setFrameId(m_loRaFrameId); + // Attach the measured carrier frequency offset to this frame. + m_decodeMsg->setCfoHz(cfoHz); { // LoRa sync word is encoded across two net-ID chirps. // First chirp (index 0) carries the high nibble, second (index 1) the low nibble. From 55e21d2dbfff7b713c8eb7c971092e6e50ad0077 Mon Sep 17 00:00:00 2001 From: jvn314 Date: Sat, 10 Oct 2026 20:48:48 -0500 Subject: [PATCH 41/41] Emit carrier frequency offset as JSON --- plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp | 2 ++ plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp index e54011d6c..52b140f76 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp @@ -601,6 +601,8 @@ QString MeshtasticDemod::buildMeshtasticJsonPacket( rf["signal_db"] = msg.getSingalDb(); rf["noise_db"] = msg.getNoiseDb(); rf["snr_db"] = msg.getSingalDb() - msg.getNoiseDb(); + // Emit the carrier frequency offset in Hz rounded to two decimal places. + rf["cfoHz"] = std::round(msg.getCfoHz() * 100.0) / 100.0; root["rf"] = rf; // LoRa diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp index 7b7f858f9..a53c4b93d 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp @@ -362,6 +362,8 @@ bool MeshtasticDemodDecoder::handleMessage(const Message& cmd) outputMsg->setSyncWord(msgSyncWord); outputMsg->setSignalDb(msgSignalDb); outputMsg->setNoiseDb(msgNoiseDb); + // Forward this frame's carrier frequency offset to the decode report. + outputMsg->setCfoHz(msg.getCfoHz()); outputMsg->setMsgTimestamp(msgTimestamp); outputMsg->setPacketSize(getPacketLength()); outputMsg->setNbParityBits(getNbParityBits());