From 95cdeff49ea681c2d8fb9cb0743e930ee4806d61 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Mon, 16 Jun 2014 11:22:21 +0400 Subject: [PATCH] Explicit cast in transport CRC computer --- libuavcan/include/uavcan/transport/crc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuavcan/include/uavcan/transport/crc.hpp b/libuavcan/include/uavcan/transport/crc.hpp index c025ec13f3..860ef4f33e 100644 --- a/libuavcan/include/uavcan/transport/crc.hpp +++ b/libuavcan/include/uavcan/transport/crc.hpp @@ -42,7 +42,7 @@ public: #if UAVCAN_TINY void add(uint8_t byte) { - value_ ^= byte << 8; + value_ ^= static_cast(byte) << 8; for (uint8_t bit = 8; bit > 0; --bit) { if (value_ & 0x8000)