More changes meant just to fix up compiler warnings.

This commit is contained in:
Collin Kidder
2019-08-08 22:09:02 -04:00
parent 947f24f267
commit 0567d5ef14
5 changed files with 24 additions and 20 deletions
+5 -4
View File
@@ -155,15 +155,16 @@ bool DBC_SIGNAL::processAsInt(const CANFrame &frame, int32_t &outValue)
}
if (valType == SIGNED_INT) isSigned = true;
if ( frame.len*8 < (startBit+signalSize) )
if ( static_cast<int>(frame.len * 8) < (startBit + signalSize) )
{
result = 0;
return false;
}
result = Utility::processIntegerSignal(frame.data, startBit, signalSize, intelByteOrder, isSigned);
double endResult = ((double)result * factor) + bias;
result = (int32_t)endResult;
result = static_cast<int32_t>(Utility::processIntegerSignal(frame.data, startBit, signalSize, intelByteOrder, isSigned));
double endResult = (result * factor) + bias;
result = static_cast<int32_t>(endResult);
cachedValue = result;
outValue = result;
return true;