More warning fixes in the STM32 drvier, STM32 test project and the library core

This commit is contained in:
Pavel Kirienko
2014-08-28 17:28:44 +04:00
parent acf45e3e6b
commit 8a8bb78d38
7 changed files with 186 additions and 184 deletions
+3 -3
View File
@@ -42,16 +42,16 @@ public:
#if UAVCAN_TINY
void add(uint8_t byte)
{
value_ ^= static_cast<uint16_t>(byte) << 8;
value_ ^= uint16_t(uint16_t(byte) << 8);
for (uint8_t bit = 8; bit > 0; --bit)
{
if (value_ & 0x8000U)
{
value_ = (value_ << 1) ^ 0x1021U;
value_ = uint16_t(uint16_t(value_ << 1) ^ 0x1021U);
}
else
{
value_ = (value_ << 1);
value_ = uint16_t(value_ << 1);
}
}
}