From bfe1447426023bc827f8cab15340975266c78781 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Fri, 18 Apr 2014 18:46:47 +0400 Subject: [PATCH] Fixes suggested by static analyzer --- libuavcan/include/uavcan/transport/transfer_buffer.hpp | 2 +- libuavcan/src/driver/uc_can.cpp | 1 + libuavcan/src/transport/uc_frame.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libuavcan/include/uavcan/transport/transfer_buffer.hpp b/libuavcan/include/uavcan/transport/transfer_buffer.hpp index 5437d4b586..723b2e9540 100644 --- a/libuavcan/include/uavcan/transport/transfer_buffer.hpp +++ b/libuavcan/include/uavcan/transport/transfer_buffer.hpp @@ -136,7 +136,7 @@ public: ~DynamicTransferBufferManagerEntry() { - resetImpl(); + DynamicTransferBufferManagerEntry::resetImpl(); } static DynamicTransferBufferManagerEntry* instantiate(IPoolAllocator& allocator, uint16_t max_size); diff --git a/libuavcan/src/driver/uc_can.cpp b/libuavcan/src/driver/uc_can.cpp index 9f0abfeab6..97c2fa4501 100644 --- a/libuavcan/src/driver/uc_can.cpp +++ b/libuavcan/src/driver/uc_can.cpp @@ -113,6 +113,7 @@ std::string CanFrame::toString(StringRepresentation mode) const } wpos += snprintf(wpos, epos - wpos, "\'"); } + (void)wpos; return std::string(buf); } #endif diff --git a/libuavcan/src/transport/uc_frame.cpp b/libuavcan/src/transport/uc_frame.cpp index 1509210f90..c81d06cc05 100644 --- a/libuavcan/src/transport/uc_frame.cpp +++ b/libuavcan/src/transport/uc_frame.cpp @@ -220,7 +220,7 @@ std::string Frame::toString() const ofs += snprintf(buf + ofs, BUFLEN - ofs, " "); } } - ofs += snprintf(buf + ofs, BUFLEN - ofs, "]"); + (void)snprintf(buf + ofs, BUFLEN - ofs, "]"); return std::string(buf); } #endif