Resolve signedness warnings on GCC

pull/25/head
Kyle Schwarz 2020-08-18 15:37:05 -04:00
parent 4cd897badd
commit 3e4b595fe4
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ std::vector<uint8_t> FlexRayControlMessage::BuildWriteMessageBufferArgs(
uint8_t(desiredSize / 4)
};
args.insert(args.end(), data.begin(), data.end());
if(args.size() != desiredSize + 2)
if((int)args.size() != desiredSize + 2)
args.resize(desiredSize + 2);
return BuildBaseControlArgs(controller, FlexRay::Opcode::WriteMessageBuffer, args);
}

View File

@ -281,7 +281,7 @@ bool FlexRay::Controller::configure(std::chrono::milliseconds timeout) {
uint16_t dataPointer = (totalBuffers + 1) * 4;
for(auto i = 0; i < totalBuffers; i++) {
MessageBuffer& buf = *(i < staticTx.size() ? staticTx[i] : dynamicTx[i - staticTx.size()]);
MessageBuffer& buf = *(i < (int)staticTx.size() ? staticTx[i] : dynamicTx[i - staticTx.size()]);
if(buf.frameID == 0)
buf.frameID = i | (1 << 10);