Resolve macOS compile warnings

This commit is contained in:
Paul Hollinsky
2018-09-26 18:30:06 -04:00
parent 399c72e61d
commit bbcc5b2d7b
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ namespace icsneo {
class Communication {
public:
Communication(std::shared_ptr<ICommunication> com, std::shared_ptr<Packetizer> p, std::shared_ptr<Decoder> md) : impl(com), packetizer(p), decoder(md) {}
Communication(std::shared_ptr<ICommunication> com, std::shared_ptr<Packetizer> p, std::shared_ptr<Decoder> md) : packetizer(p), decoder(md), impl(com) {}
virtual ~Communication() { close(); }
bool open();
@@ -41,6 +41,6 @@ private:
}
};
};
}
#endif
@@ -12,6 +12,6 @@ public:
Command command;
};
};
}
#endif
@@ -19,6 +19,6 @@ public:
bool hasPCBSerial = false;
};
};
}
#endif
+1 -1
View File
@@ -96,7 +96,7 @@ void MultiChannelCommunication::readTask() {
continue;
}
for(auto i = 0; i < currentReadIndex; i++)
for(size_t i = 0; i < currentReadIndex; i++)
usbReadFifo.pop_front();
payloadBytes.clear();
+1 -1
View File
@@ -5,7 +5,7 @@ using namespace icsneo;
uint8_t Packetizer::ICSChecksum(const std::vector<uint8_t>& data) {
uint32_t checksum = 0;
for(auto i = 0; i < data.size(); i++)
for(size_t i = 0; i < data.size(); i++)
checksum += data[i];
checksum = ~checksum;
checksum++;