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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
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<RemoteDataFrame> 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 <rgetz503@gmail.com>
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 <rgetz503@gmail.com>
Fix TX scaling bug that was costing 10dB of output power at max gain.
Improve performance on Windows to reduce overruns at high sample rates.
Add underrun stats.
Display temperature.
Improve error handling.
Move setting device settings off GUI thread. For #1522
Add a terminating LF to tracked text files that were missing a
newline at end of file. This avoids Codacy whitespace failures and
ensures text files conform to the repository line-ending policy.
Affected files were identified and fixed with the following script.
It checks all tracked files against .gitattributes, skips files marked
as binary or -text, and reports the final 32 bytes of any non-empty text
file that does not end with LF before adding the missing newline.
git ls-files -z |
while IFS= read -r -d '' f; do
attr=$(git check-attr text -- "$f")
case "$attr" in
"$f: text: unset"|"$f: text: unspecified")
continue
;;
esac
[ -f "$f" ] || continue
[ -s "$f" ] || continue
[ "$(tail -c 1 -- "$f" | od -An -t x1 | tr -d ' \n')" = "0a" ] || {
printf '%s\n' "$f"
tail -c 32 -- "$f" | hexdump -C
printf '\n' >> "$f"
}
done
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Assign descriptive names to SDRangel threads so thread activity can be
identified when investigating multi-threaded behavior, including crashes,
leaks, and synchronization issues in debuggers and others tools.
Use compact names to fit platform thread-name limits (14 chars) while
retaining the component and thread role where possible.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
MessageQueue::pop() transfers ownership of the popped message to the
caller, but many handleInputMessages() implementations only deleted
the message when handleMessage() returned true. When a message was not
handled, ownership had already been transferred from the queue and the
message was leaked.
This was identified while investigating an ASAN leak in the audio
subsystem.
Update the applicable handleInputMessages() implementations to always
delete messages after handleMessage() returns. Unhandled messages are
also logged with the component and message identifier so unexpected
message routing is visible during debugging.
This change:
- Ensures every message popped from a queue has its ownership resolved.
- Prevents leaks when handleMessage() returns false.
- Makes unhandled messages visible instead of silently discarding them.
- Preserves the existing message handling logic and does not require
components to handle message types that are legitimately irrelevant
to them.
The changes are intentionally mechanical and limited to the common
message queue ownership and diagnostic pattern.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the destination ID so AIS single-slot binary messages have a
defined value when no destination is indicated.
Found by Coverity (UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the heading availability flag and heading value so SAR aircraft
position reports have defined heading state before the decoded message data
is used. This avoids undefined behavior from reading uninitialized members.
Found by cppcheck (uninitMemberVar).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize APRS packet fields and telemetry buffers so a default-constructed
packet has defined values for decoded position, weather, station, telemetry,
and other optional data. This prevents undefined behavior when optional
fields are accessed before their corresponding presence flags are set.
Found by cppcheck (uninitMemberVar).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize all AudioCompressorSnd data members in the constructor so
the compressor state and audio buffers have defined values before use.
This prevents undefined behavior from reading uninitialized member
variables.
Found by cppcheck (uninitMemberVar).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the filter state buffers in the constructor so filter processing
starts from a defined state rather than reading uninitialized values. This
avoids undefined behavior and makes the initial filter output deterministic.
Found by cppcheck (uninitMemberVar).
Signed-off-by: Robin Getz <rgetz503@gmail.com>