diff --git a/libuavcan/include/uavcan/marshal/float_spec.hpp b/libuavcan/include/uavcan/marshal/float_spec.hpp index 7c550d3be2..5121b6d297 100644 --- a/libuavcan/include/uavcan/marshal/float_spec.hpp +++ b/libuavcan/include/uavcan/marshal/float_spec.hpp @@ -52,7 +52,7 @@ public: { typedef typename IntegerSpec::StorageType IntType; typedef typename NativeFloatSelector::Type FloatType; - StaticAssert::is_iec559>::check(); + StaticAssert::check(); union { IntType i; FloatType f; } u; u.f = value; return u.i; @@ -64,7 +64,7 @@ public: { typedef typename IntegerSpec::StorageType IntType; typedef typename NativeFloatSelector::Type FloatType; - StaticAssert::is_iec559>::check(); + StaticAssert::check(); union { IntType i; FloatType f; } u; u.i = value; return u.f; diff --git a/libuavcan/include/uavcan/marshal/scalar_codec.hpp b/libuavcan/include/uavcan/marshal/scalar_codec.hpp index 27affdb323..4ec4430646 100644 --- a/libuavcan/include/uavcan/marshal/scalar_codec.hpp +++ b/libuavcan/include/uavcan/marshal/scalar_codec.hpp @@ -126,7 +126,7 @@ int ScalarCodec::decode(T& value) if (read_res > 0) { convertByteOrder(byte_union.bytes); - fixTwosComplement(byte_union.value); + fixTwosComplement(byte_union.value); value = byte_union.value; } return read_res; diff --git a/libuavcan/src/transport/uc_frame.cpp b/libuavcan/src/transport/uc_frame.cpp index 6e29770d73..1509210f90 100644 --- a/libuavcan/src/transport/uc_frame.cpp +++ b/libuavcan/src/transport/uc_frame.cpp @@ -57,7 +57,7 @@ bool Frame::parse(const CanFrame& can_frame) return false; } - if (can_frame.dlc > sizeof(CanFrame::data)) + if (can_frame.dlc > sizeof(can_frame.data)) { assert(0); // This is not a protocol error, so assert() is ok return false; @@ -148,7 +148,7 @@ bool Frame::compile(CanFrame& out_can_frame) const case TransferTypeServiceRequest: case TransferTypeMessageUnicast: { - assert((payload_len_ + 1) <= sizeof(CanFrame::data)); + assert((payload_len_ + 1) <= sizeof(out_can_frame.data)); out_can_frame.data[0] = dst_node_id_.get(); out_can_frame.dlc = payload_len_ + 1; std::copy(payload_, payload_ + payload_len_, out_can_frame.data + 1); diff --git a/libuavcan/src/transport/uc_transfer_sender.cpp b/libuavcan/src/transport/uc_transfer_sender.cpp index 11c29307bf..81a1aac13b 100644 --- a/libuavcan/src/transport/uc_transfer_sender.cpp +++ b/libuavcan/src/transport/uc_transfer_sender.cpp @@ -44,7 +44,7 @@ int TransferSender::send(const uint8_t* payload, int payload_len, MonotonicTime TransferCRC crc = crc_base_; crc.add(payload, payload_len); - static const int BUFLEN = sizeof(CanFrame::data); + static const int BUFLEN = sizeof(static_cast(0)->data); uint8_t buf[BUFLEN]; buf[0] = crc.get() & 0xFF; // Transfer CRC, little endian