Initialize m_repeatDelay and m_repeatCount from the corresponding constructor
arguments so the dialog state is defined when the dialog is created.
These members were previously left uninitialized despite the constructor
receiving the values used to initialize the corresponding UI controls.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the packet BPF dialog members from their corresponding constructor
arguments so the dialog state is defined when the dialog is created.
These members were previously left uninitialized despite the constructor
receiving the values used to initialize the corresponding UI controls.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add parentheses around nested conditional expressions used to clamp
FFT window value during deserialization.
The expressions were valid C++, but the nested ternary operators were
ambiguous to static analysis and triggered cppcheck warnings about comparing
boolean expressions with integers. Explicitly grouping the inner conditional
makes the intended evaluation clear without changing the behavior.
No functional changes.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
The final bytesToHex() call in toHexCharArray() returns the advanced buffer
pointer, but the pointer is not used after the call. Discard the return value
explicitly while retaining the function call that writes the payload into the
output buffer.
This removes the ineffective parameter assignment reported by cppcheck without
changing the generated frame data.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the NFM modulator thread and baseband source pointers to null so
their state is defined before the corresponding runtime components are created.
These members were previously left uninitialized, allowing indeterminate pointer
values to exist during the initial object state.
This resolves the uninitialized pointer findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize t1 to zero so the modulator produces a defined sample when no
carrier is present.
t1 was previously only assigned when carrier was true but was used
unconditionally when writing to the modulation buffer, allowing an
uninitialized value to be used.
This resolves the uninitialized scalar finding reported by Coverity
(UNINIT).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the M17 LICH segment array and position insertion toggle so their
state is defined when the processor is constructed.
The LICH array and insertion toggle were previously left uninitialized, which
could result in indeterminate state when they were accessed before being
explicitly assigned.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_fifoEmpty to true in both M17ModFIFO constructors so a newly
created FIFO has a defined empty state before any samples are written.
The parameterized constructor previously left m_fifoEmpty uninitialized,
allowing FIFO state to depend on an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the decimator configuration, kernel state, and cursor before the
object can be used. These members were previously left uninitialized until
initialize() was called, leaving the object with indeterminate state between
construction and initialization.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the payload symbol count, modulation efficiency, and configuration
update state before they can be accessed by DVB-S2 processing.
These members were previously left uninitialized, allowing indeterminate values
to be used before the corresponding configuration state had been established.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the DVB-S2 frame format and LDPC encoding state so their members
start with defined values before configuration and encoding operations use them.
The members were previously left uninitialized, allowing indeterminate state
to persist until individual fields were assigned.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
The modulation and FEC switches in getDVBSDataBitrate() did not define values
for unsupported settings, allowing execution to continue with uninitialized
bitrate calculation inputs. Return an invalid bitrate for unsupported settings
and check the result before using it.
Avoid passing an invalid bitrate to still-image TS generation, and keep
modulateSample() running so the existing null transport-stream packet handling
can continue to produce samples when generation cannot proceed.
Coverity identified these paths as uninitialized scalar variables
(UNINIT).
Initialize the AM modulator thread, running state, and baseband source
pointers in the constructor.
These members were previously left uninitialized, which could result in
undefined values when the object state was accessed before the corresponding
runtime components were created.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the AIS TX settings dialog members from their corresponding
constructor arguments so the dialog state is valid when the dialog is
created.
These members were previously left uninitialized despite the constructor
receiving the values used to initialize the dialog controls.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_repeatDelay and m_repeatCount from the corresponding constructor
arguments so the dialog state is valid when the dialog is created.
These members were previously left uninitialized despite the constructor
receiving the values used to initialize the dialog controls.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the TX settings dialog members from their corresponding constructor
arguments so the dialog state is valid when the dialog is created.
These members were previously left uninitialized despite the constructor
receiving the values used to populate the dialog controls.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_repeatDelay and m_repeatCount from the corresponding constructor
arguments so the dialog state is valid when the dialog is created.
These members were previously left uninitialized until the dialog was accepted,
despite representing the initial repeat settings passed to the constructor.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize M17 demodulator state that was previously left uninitialized,
including the upsampler state, diagnostic values, packet state, and standard
packet protocol.
These members can be accessed before the first demodulator diagnostic callback
or packet processing operation, so leaving them uninitialized can result in
undefined behavior.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize nprocs and shift for each DVB-S2 FEC helper pool entry. These
members were previously left uninitialized, which could result in undefined
behavior when their values were accessed before being assigned.
This resolves the uninitialized member warnings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_blindAngleBorder to false in the DOA2Compass constructor. The
member was previously left uninitialized, resulting in undefined behavior
when its value was used before setBlindAngleBorder() was called.
This resolves the uninitialized member reported by Coverity (UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add parentheses around nested conditional expressions used to clamp
deserialized DVB standard, modulation, FEC, and sampler values.
The expressions were valid C++, but the nested ternary operators were
ambiguous to static analysis and triggered cppcheck warnings about comparing
boolean expressions with integers. Explicitly grouping the inner conditional
makes the intended evaluation clear without changing the behavior.
No functional changes.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Store VOR round-robin turn counters using std::size_t to match the type
returned by std::vector::size() and the type used for vector indexing.
The counters were previously stored as int but converted to unsigned int
when used in rrNextTurn(). Using std::size_t consistently removes the
signed/unsigned mismatch and makes the counter type appropriate for its use
as an index into the round-robin plan.
This also allows cppcheck to correctly reason about the relationship between
the turn counter and the plan size.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add parentheses around nested conditional expressions used to clamp
deserialized DVB standard, modulation, FEC, and sampler values.
The expressions were valid C++, but the nested ternary operators were
ambiguous to static analysis and triggered cppcheck warnings about comparing
boolean expressions with integers. Explicitly grouping the inner conditional
makes the intended evaluation clear without changing the behavior.
No functional changes.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
The PLS error counters are declared as uint32_t, but the diagnostic message
used the signed integer %d format specifier. This does not match the argument
types expected by fprintf() and can produce format warnings from static
analysis.
Use the unsigned %u format specifier for both PLS error counters so the format
string matches their declared types.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Round-robin plans are generated for each available device based on the VOR
channels that can be allocated within the device's available bandwidth. A
device can legitimately produce an empty plan when none of the remaining VOR
frequency combinations fit within that bandwidth.
Empty plans are retained in m_rrPlans because each entry corresponds to a
device and must remain aligned with the per-device m_rrTurnCounters entries.
rrNextTurn() previously assumed every plan contained at least one turn and
unconditionally accessed rrPlan[turnCount]. For an empty plan, the initial
turn count is zero, resulting in an out-of-bounds access.
Skip empty plans in rrNextTurn() while still advancing the device index so
subsequent plans remain aligned with their corresponding turn counters.
This prevents invalid accesses and resolves the out-of-bounds condition
reported by cppcheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Guard the sample FIFO size diagnostic against a null m_sampleFifo before
accessing it. Report "nullptr" when the FIFO is not available instead of
dereferencing the null pointer.
This prevents a null-pointer dereference in debug logging while preserving
the existing diagnostic information.
pointed out by cppcheck's nullPointerRedundantCheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Previously, geoReply() combined the sender null check with the reply error
check, allowing a null pQGeoCode to reach the error handling and subsequent
cleanup, which deferenced the pointer it was checking.
Check for a null sender first and return immediately when dynamic_cast()
fails. Valid replies then proceed through the existing error handling and
cleanup safely.
pointed out by cppcheck's nullPointerRedundantCheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Previously, geoReply() combined the sender null check with the reply error
check, allowing a null pQGeoCode to reach the error handling and subsequent
deleteLater() call.
Check for a null sender first and return immediately when dynamic_cast()
fails. Valid replies then proceed through the existing error handling and
cleanup safely.
pointed out by cppcheck's nullPointerRedundantCheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Move the tabname diagnostic inside the existing null check to prevent
fprintf() from dereferencing a null tabname when an unsupported MODCOD
has no corresponding LDPC table entry.
This resolves the cppcheck nullPointerRedundantCheck warning while
preserving the existing handling of missing table entries.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Remove the redundant m_renderer null check from the rendering loop. The
renderer is validated before entering the loop and is not changed while
run() executes, while rendering is controlled by m_renderingVideo and
renderStream().
This also prevents cppcheck from incorrectly treating the loop condition
as a possible path to a null pointer dereference during cleanup
(nullPointerRedundantCheck).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Zero-initialize the FCDProPlusThread sample buffer to eliminate the cppcheck
UNINIT_CTOR warning. This ensures the sample buffer starts in a defined state
and avoids undefined behavior from reading uninitialized samples.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Zero-initialize the FCDProThread sample buffer to eliminate the cppcheck
UNINIT_CTOR warning. This ensures the sample buffer starts in a defined state
and avoids undefined behavior from reading uninitialized samples.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized frequency position and audio sample
buffer members to defined values to eliminate cppcheck UNINIT_CTOR warnings.
This ensures the worker starts with a known state and avoids undefined behavior
from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_spectrumSink pointer to nullptr to
eliminate the cppcheck UNINIT_CTOR warning. This ensures the spectrum sink
starts in a defined state and avoids undefined behavior from accessing an
uninitialized pointer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_spectrumSink pointer to nullptr to
eliminate the cppcheck UNINIT_CTOR warning. This ensures the spectrum sink
starts in a defined state and avoids undefined behavior from accessing an
uninitialized pointer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize previously uninitialized status, transmit format, timing, and
sample tracking members to defined values to eliminate cppcheck UNINIT_CTOR
warnings. This ensures the output worker starts in a known state and avoids
undefined behavior from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized sample FIFO and frequency position
members to defined values to eliminate cppcheck UNINIT_CTOR warnings. This
ensures the output thread starts with a known state and avoids undefined
behavior from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized log2 decimation and frequency position
members to defined values to eliminate cppcheck UNINIT_CTOR warnings. This
ensures the thread starts with a known acquisition state and avoids undefined
behavior from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Zero-initialize the Metis MISO accumulators to eliminate the cppcheck
UNINIT_CTOR warning. This ensures all accumulator values start in a defined
state before resetCounters() and subsequent processing.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_forceRRAveraging member to false to
eliminate the cppcheck UNINIT_CTOR warning. This ensures the averaging option
starts in a defined state and avoids undefined behavior from reading an
uninitialized value.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_tabs pointer to nullptr to eliminate
the cppcheck UNINIT_CTOR warning. This ensures the WebView tab state starts in
a defined state and avoids undefined behavior from accessing an uninitialized
pointer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_rgbColor member to black to
eliminate the cppcheck UNINIT_CTOR warning. This ensures the sky map color
starts in a defined state and avoids undefined behavior from reading an
uninitialized value.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize previously uninitialized RigCtlServerWorker target frequency,
offset, and bandwidth members to defined values to eliminate cppcheck
UNINIT_CTOR warnings. This ensures target settings start in a known state
and avoids undefined behavior from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_enabled member to false to eliminate
the cppcheck UNINIT_CTOR warning and ensure the rig control server starts in a
defined disabled state.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_workspaceIndex member to zero to
eliminate the cppcheck UNINIT_CTOR warning and ensure the workspace index
starts in a defined state.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the AGC and bias tee state to false to eliminate cppcheck
UNINIT_CTOR warnings and ensure DeviceGains starts in a defined state.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize previously uninitialized VorLocalizerWorker state members to defined
values to eliminate cppcheck UNINIT_CTOR warnings. This ensures VOR ranges,
round-robin device and channel state, turn plans, and channel allocations start
in a known state and avoids undefined behavior from reading uninitialized data.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize previously uninitialized VORChannel and AvailableChannel members to
defined values to eliminate cppcheck UNINIT_CTOR warnings. This ensures channel
configuration and API state start in a known state and avoids undefined behavior
from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize previously uninitialized VORChannelReport radial, magnitude, and
validity members to defined values to eliminate cppcheck UNINIT_CTOR warnings.
This ensures channel reports start in a known state and avoids undefined
behavior from reading uninitialized values.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the previously uninitialized m_rgbColor member to black to eliminate
the cppcheck UNINIT_CTOR warning. This ensures the map color starts in a defined
state and avoids undefined behavior from reading an uninitialized value.
Signed-off-by: Robin Getz <rgetz503@gmail.com>