From ec84f64f5f194d9f7bd8b0cd72d12431a17ecb42 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 5 May 2016 05:30:49 +0300 Subject: [PATCH] Warning fixes (GCC 5.3) --- libuavcan/src/marshal/uc_float_spec.cpp | 2 +- libuavcan/src/transport/uc_can_io.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libuavcan/src/marshal/uc_float_spec.cpp b/libuavcan/src/marshal/uc_float_spec.cpp index 13a1a7ac6..267e0a6bc 100644 --- a/libuavcan/src/marshal/uc_float_spec.cpp +++ b/libuavcan/src/marshal/uc_float_spec.cpp @@ -58,7 +58,7 @@ uint16_t IEEE754Converter::nativeIeeeToHalf(float value) out = uint16_t(in.u >> 13); /* Take the bits! */ } - out |= uint16_t(sign >> 16); + out = uint16_t(out | (sign >> 16)); return out; } diff --git a/libuavcan/src/transport/uc_can_io.cpp b/libuavcan/src/transport/uc_can_io.cpp index d6417a670..aa53d0c91 100644 --- a/libuavcan/src/transport/uc_can_io.cpp +++ b/libuavcan/src/transport/uc_can_io.cpp @@ -314,7 +314,7 @@ uint8_t CanIOManager::makePendingTxMask() const { if (!tx_queues_[i]->isEmpty()) { - write_mask |= uint8_t(1 << i); + write_mask = uint8_t(write_mask | (1 << i)); } } return write_mask;