From b7a57a466862221f91293bfbaaa99b75ca0a2cf7 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 17:35:00 -0400 Subject: [PATCH] remotesink: Initialize FIFO size and indices Initialize the FIFO size and read, served, and write indices in the default constructor to prevent use of indeterminate state. Identified by cppcheck. Signed-off-by: Robin Getz --- plugins/channelrx/remotesink/remotesinkfifo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/remotesink/remotesinkfifo.cpp b/plugins/channelrx/remotesink/remotesinkfifo.cpp index ea20ca182..6af8440e7 100644 --- a/plugins/channelrx/remotesink/remotesinkfifo.cpp +++ b/plugins/channelrx/remotesink/remotesinkfifo.cpp @@ -18,7 +18,11 @@ #include "remotesinkfifo.h" RemoteSinkFifo::RemoteSinkFifo(QObject *parent) : - QObject(parent) + QObject(parent), + m_size(0), + m_readHead(0), + m_servedHead(0), + m_writeHead(0) {} RemoteSinkFifo::RemoteSinkFifo(unsigned int size, QObject *parent) :