From 3cd633736f85b54dd7e37a36de9e5fdac9f9cdb0 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 3 Oct 2026 14:37:51 -0400 Subject: [PATCH] wdsp/nbp: Initialize notch database state Initialize tunefreq, shift, and hadnotch in the NBP constructors. Found by cppcheck. Signed-off-by: Robin Getz --- wdsp/nbp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wdsp/nbp.cpp b/wdsp/nbp.cpp index 73a11f88e..9053e1557 100644 --- a/wdsp/nbp.cpp +++ b/wdsp/nbp.cpp @@ -41,7 +41,9 @@ namespace WDSP { * * ********************************************************************************************************/ -NOTCHDB::NOTCHDB(int _master_run, int _maxnotches) +NOTCHDB::NOTCHDB(int _master_run, int _maxnotches) : + tunefreq(0), + shift(0) { master_run = _master_run; maxnotches = _maxnotches; @@ -433,7 +435,8 @@ NBP::NBP( flow(_flow), fhigh(_fhigh), maxpb(_maxpb), - notchdb(_notchdb) + notchdb(_notchdb), + hadnotch(0) { bplow.resize(maxpb); bphigh.resize(maxpb);