#1292 Fixed CppCheck Issues in SocketInterface

This commit is contained in:
Jacob Støren 2017-03-06 11:19:15 +01:00
parent 6c0a866008
commit 29d30f34d8
3 changed files with 3 additions and 8 deletions

View File

@ -585,7 +585,6 @@ public:
while ((currentClient->bytesAvailable() >= (int)m_bytesPerTimeStepToRead) && (m_currentTimeStepNumberToRead < m_timeStepCountToRead))
{
qint64 bytesRead = 0;
if ( !isCoarseningActive)
{
internalMatrixData = m_scalarResultsToAdd->at(m_requestedTimesteps[m_currentTimeStepNumberToRead]).data();
@ -631,8 +630,7 @@ public:
RimEclipseInputCase* inputRes = dynamic_cast<RimEclipseInputCase*>(m_currentReservoir);
if (inputRes)
{
RimEclipseInputProperty* inputProperty = NULL;
inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
if (!inputProperty)
{
inputProperty = new RimEclipseInputProperty;
@ -995,8 +993,7 @@ public:
RimEclipseInputCase* inputRes = dynamic_cast<RimEclipseInputCase*>(m_currentReservoir);
if (inputRes)
{
RimEclipseInputProperty* inputProperty = NULL;
inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
if (!inputProperty)
{
inputProperty = new RimEclipseInputProperty;

View File

@ -26,7 +26,6 @@
bool RiaSocketDataTransfer::writeBlockDataToSocket(QTcpSocket* socket, const char* data, quint64 bytesToWrite, QStringList& errorMessages)
{
quint64 bytesWritten = 0;
int blockCount = 0;
quint64 maxBlockSize = maximumValueCountInBlock() * sizeof(double);
@ -45,7 +44,6 @@ bool RiaSocketDataTransfer::writeBlockDataToSocket(QTcpSocket* socket, const cha
bytesWritten += actuallyBytesWritten;
blockCount++;
}
return true;

View File

@ -47,7 +47,7 @@ public:
enum ReadState {ReadingCommand, ReadingPropertyData};
public:
RiaSocketServer(QObject *parent = 0);
explicit RiaSocketServer(QObject *parent = 0);
~RiaSocketServer();
unsigned short serverPort();