Browse Source

remoteoutput: 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 <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
a386c1eb0e
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 6
      plugins/samplesink/remoteoutput/remoteoutputfifo.cpp

6
plugins/samplesink/remoteoutput/remoteoutputfifo.cpp

@ -18,7 +18,11 @@ @@ -18,7 +18,11 @@
#include "remoteoutputfifo.h"
RemoteOutputFifo::RemoteOutputFifo(QObject *parent) :
QObject(parent)
QObject(parent),
m_size(0),
m_readHead(0),
m_servedHead(0),
m_writeHead(0)
{}
RemoteOutputFifo::RemoteOutputFifo(unsigned int size, QObject *parent) :

Loading…
Cancel
Save