Add a pending sample adjustment to the next FIFO consumption and clear it after use or frame reset. Nothing sets a nonzero adjustment yet, so decoding behavior is unchanged.
Keep the existing fractional STO result exactly, including half-bin ties. When requested through an optional out-parameter, report the integer residual of the aligned, fractional-CFO-corrected preamble peak. Existing callers do not request the residual, so decoding behavior is unchanged.
resolve compiler warning:
warning[-Wunused-but-set-variable=]: variable ‘dOfs’ set but not used
by removing it.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Remove unused loop counters from the SoapySDR input and output GUI loops.
The counters were incremented but never used, triggering
-Wunused-but-set-variable compiler warnings.
The loops are already controlled by their iterators, so removing the counters
does not change behavior.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Check the return value from avformat_write_header() and stop TS generation
when writing the header fails.
Use a common cleanup path for codec and format resources on setup failures.
This resolves the -Wunused-result compiler warning while ensuring failures
do not continue into TS packet generation.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Use value-initialization for the AVPacket so all packet fields are initialized
without triggering -Wmissing-field-initializers from modern compilers.
This replaces the partial initializer while preserving the existing packet
handling behavior.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Replace the deprecated av_init_packet() API with av_packet_alloc() and free
the allocated packet through the existing cleanup path.
This gives the packet explicit ownership and ensures it is released on both
successful and error paths.
This resolves the deprecated API warning reported by the compiler.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Move m_nrziBit initialization to match its declaration order in AISModSource.
The initializer list previously initialized m_nrziBit after m_state even though
m_nrziBit is declared earlier in the class, producing a -Wreorder compiler
warning.
This removes the initializer-order warning without changing behavior.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
in 6a56c25dd0
the qDebug statement that used sumMagSq was removed, but the calculation was not.
this led to a compiler warning:
plugins/channelrx/freqscanner/freqscannersink.cpp:927:10:
warning[-Wunused-but-set-variable=]: variable ‘sumMagSq’ set but not used
resolve that, but removing the variable and it's calculation.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_packets, m_overflows, and m_timeouts to zero so the USRP input
thread starts with defined stream status counters.
The counters were previously left uninitialized, allowing stream status
reporting to use indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_rfChanged to zero so the SDRPlay V3 thread starts with a defined
RF change state before RF changes are processed.
The member was previously left uninitialized, allowing RF change state checks
to use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Drop the current input batch when the remote stream reports an unsupported
sample size instead of continuing with an unpopulated conversion buffer.
The existing warning identifies the invalid stream configuration, while the
early return prevents uninitialized data from being written to the
uncompressed data FIFO.
This resolves the uninitialized value finding reported by Coverity (UNINIT).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the RemoteTCP input handler members that were left undefined so
protocol, decompression, and connection state starts with defined values.
Value-initialize the zlib stream and initialize the remaining uninitialized
members according to their intended initial state.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_sampleRate to zero so LocalInput starts with a defined sample rate
before one is configured.
The member was previously left uninitialized, allowing sample rate access to
use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Value-initialize the FileRecord header before populating its fields so all
header fields, including filler, have defined values before the header is
written.
The header was previously default-initialized, leaving filler uninitialized
and allowing indeterminate data to be passed to writeHeader().
This resolves the uninitialized value finding reported by Coverity (UNINIT).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the uninitialized Metis MISO UDP handler state variables so frame
tracking, buffer indexing, PTT state, hardware status, and power measurements
start with defined values.
These members were previously left uninitialized, allowing protocol and
hardware state to contain indeterminate values before being updated.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_sampleFifo to nullptr and m_fcPos to zero so the BladeRF2 output
thread starts with defined FIFO and frequency position state.
The members were previously left uninitialized, allowing output processing to
use indeterminate state before the FIFO or frequency position was configured.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_log2Decim and m_fcPos to zero so the BladeRF2 input thread starts
with defined decimation and frequency position state before either value is
configured.
The members were previously left uninitialized, allowing input processing to
use indeterminate configuration values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_iqOrder to false in resetToDefaults() so AudioCAT SISO settings
start with a defined IQ ordering state.
The member was previously left uninitialized when the default constructor
called resetToDefaults(), allowing the IQ ordering configuration to contain an
indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Copy m_iqOrder in the AudioCAT SISO settings copy constructor so copied
settings retain the same IQ ordering configuration as the source object.
The member was previously left uninitialized, causing copied settings to
contain an indeterminate IQ ordering value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_rig to nullptr and m_rxSampleRate to zero so the AudioCAT SISO CAT
worker starts with defined CAT and sample rate state.
The members were previously left uninitialized, allowing CAT and sample rate
processing to use indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_fcPos to zero so the AudioCAT input worker starts with a defined
frequency position before one is configured.
The member was previously left uninitialized, allowing frequency position
processing to use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_audioMagsqPeak to zero so the SimplePTT worker starts with a
defined audio peak value before any audio samples are processed.
The member was previously left uninitialized, allowing getAudioPeak() to
return an indeterminate value before the first audio peak was recorded.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_row, m_col, and m_count to zero so the channel dialog starts with
defined table and channel state.
The members were previously left uninitialized, allowing row, column, and
channel count operations to use indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_running to false so the remote control worker starts in a defined
stopped state.
The member was previously left uninitialized, allowing running-state checks to
use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Explicitly discard the integer returned by QString::toInt() when only
the conversion success flag is needed.
cppcheck reported the ignoredReturnValue warning.
Apply the fix to both MeshCore and Meshtastic pipeline field handling.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the map settings change flags to false and the file index to zero so
the dialog starts with defined state before any settings or downloads are
processed.
These members were previously left uninitialized, allowing change tracking
and file index operations to use indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_latitude and m_longitude to zero so a MapItem has defined
coordinates before its position is updated.
The members were previously left uninitialized, allowing coordinate access to
use indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_targetRA and m_targetDec to zero so the DFM protocol has defined
target coordinates before a target is set.
The members were previously left uninitialized, allowing target coordinates to
contain indeterminate values.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_sampleRate to zero so the demod analyzer has a defined sample
rate before one is reported or configured.
The member was previously left uninitialized, allowing sample rate checks to
use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_loggedIn to false so the APRS worker starts with a defined
logged-out state before a connection is established.
The member was previously left uninitialized, allowing login state checks to
use an indeterminate value.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_trackerDeviceSet and m_trackedDeviceSet to nullptr so the AFC
worker has defined device set state before tracking devices are initialized.
The pointers were previously left uninitialized until the corresponding
device sets were established.
This resolves the uninitialized member findings reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_spectrumVis to nullptr so the SSB baseband has a defined
spectrum sink state before a spectrum visualizer is attached.
The pointer was previously left uninitialized until setSpectrumSink() was
called.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_levelMeter to nullptr so the SSB modulator has a defined level
meter state before a level meter is attached.
The pointer was previously left uninitialized, allowing an indeterminate
value to remain until setLevelMeter() was called.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_repeatCount from the constructor argument so the dialog state is
defined when the dialog is created.
The member was previously left uninitialized despite the constructor receiving
the value used to initialize the corresponding UI control.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize m_repeatCount from the constructor argument so the dialog state is
defined when the dialog is created.
The member was previously left uninitialized despite the constructor receiving
the value used to initialize the corresponding UI control.
This resolves the uninitialized member finding reported by Coverity
(UNINIT_CTOR).
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize the packet TX settings 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>
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).