1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-09 01:14:58 -04:00

PVS-Studio static analysis corrections (3) issue #137

This commit is contained in:
f4exb
2018-02-24 10:29:27 +01:00
parent 9c3986ecbb
commit 2e5cfcafee
52 changed files with 187 additions and 229 deletions
@@ -18,6 +18,7 @@
#include <cassert>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <boost/crc.hpp>
#include <boost/cstdint.hpp>
#include "sdrdaemonsourcebuffer.h"
@@ -62,6 +63,9 @@ SDRdaemonSourceBuffer::SDRdaemonSourceBuffer(uint32_t throttlems) :
} else {
m_cm256_OK = true;
}
std::fill(m_decoderSlots, m_decoderSlots + nbDecoderSlots, DecoderSlot());
std::fill(m_frames, m_frames + nbDecoderSlots, BufferFrame());
}
SDRdaemonSourceBuffer::~SDRdaemonSourceBuffer()
@@ -31,6 +31,7 @@ SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo,
m_masterTimer(deviceAPI->getMasterTimer()),
m_masterTimerConnected(false),
m_running(false),
m_rateDivider(1000/SDRDAEMONSOURCE_THROTTLE_MS),
m_sdrDaemonBuffer(m_rateDivider),
m_dataSocket(0),
m_dataAddress(QHostAddress::LocalHost),
@@ -54,7 +55,6 @@ SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo,
m_converterBuffer(0),
m_converterBufferNbSamples(0),
m_throttleToggle(false),
m_rateDivider(1000/SDRDAEMONSOURCE_THROTTLE_MS),
m_autoCorrBuffer(true)
{
m_udpBuf = new char[SDRdaemonSourceBuffer::m_udpPayloadSize];
@@ -55,6 +55,7 @@ private:
const QTimer& m_masterTimer;
bool m_masterTimerConnected;
bool m_running;
uint32_t m_rateDivider;
SDRdaemonSourceBuffer m_sdrDaemonBuffer;
QUdpSocket *m_dataSocket;
QHostAddress m_dataAddress;
@@ -80,7 +81,6 @@ private:
int32_t *m_converterBuffer;
uint32_t m_converterBufferNbSamples;
bool m_throttleToggle;
uint32_t m_rateDivider;
bool m_autoCorrBuffer;
void connectTimer();