Extra warnings for the debug build: -Wfloat-equal -Wconversion. The code was fixed accordingly. No broken tests.

This commit is contained in:
Pavel Kirienko
2014-08-28 01:33:27 +04:00
parent 61c4f89ea3
commit 8240c7962b
26 changed files with 112 additions and 83 deletions
@@ -52,8 +52,8 @@ int TransferSender::send(const uint8_t* payload, int payload_len, MonotonicTime
static const int BUFLEN = sizeof(static_cast<CanFrame*>(0)->data);
uint8_t buf[BUFLEN];
buf[0] = crc.get() & 0xFF; // Transfer CRC, little endian
buf[1] = (crc.get() >> 8) & 0xFF;
buf[0] = uint8_t(crc.get() & 0xFFU); // Transfer CRC, little endian
buf[1] = uint8_t((crc.get() >> 8) & 0xFF);
(void)copy(payload, payload + BUFLEN - 2, buf + 2);
const int write_res = frame.setPayload(buf, BUFLEN);