diff --git a/libuavcan/include/uavcan/node/node.hpp b/libuavcan/include/uavcan/node/node.hpp index 3ccb9d59cc..7688e525f8 100644 --- a/libuavcan/include/uavcan/node/node.hpp +++ b/libuavcan/include/uavcan/node/node.hpp @@ -184,35 +184,35 @@ public: #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 template - inline int logDebug(const char* source, const char* format, Args... args) + inline void logDebug(const char* source, const char* format, Args... args) { - return proto_logger_.logDebug(source, format, args...); + (void)proto_logger_.logDebug(source, format, args...); } template - inline int logInfo(const char* source, const char* format, Args... args) + inline void logInfo(const char* source, const char* format, Args... args) { - return proto_logger_.logInfo(source, format, args...); + (void)proto_logger_.logInfo(source, format, args...); } template - inline int logWarning(const char* source, const char* format, Args... args) + inline void logWarning(const char* source, const char* format, Args... args) { - return proto_logger_.logWarning(source, format, args...); + (void)proto_logger_.logWarning(source, format, args...); } template - inline int logError(const char* source, const char* format, Args... args) + inline void logError(const char* source, const char* format, Args... args) { - return proto_logger_.logError(source, format, args...); + (void)proto_logger_.logError(source, format, args...); } #else - int logDebug(const char* source, const char* text) { return proto_logger_.logDebug(source, text); } - int logInfo(const char* source, const char* text) { return proto_logger_.logInfo(source, text); } - int logWarning(const char* source, const char* text) { return proto_logger_.logWarning(source, text); } - int logError(const char* source, const char* text) { return proto_logger_.logError(source, text); } + void logDebug(const char* source, const char* text) { (void)proto_logger_.logDebug(source, text); } + void logInfo(const char* source, const char* text) { (void)proto_logger_.logInfo(source, text); } + void logWarning(const char* source, const char* text) { (void)proto_logger_.logWarning(source, text); } + void logError(const char* source, const char* text) { (void)proto_logger_.logError(source, text); } #endif diff --git a/libuavcan/test/node/node.cpp b/libuavcan/test/node/node.cpp index 3202c932c2..5e874ba8c8 100644 --- a/libuavcan/test/node/node.cpp +++ b/libuavcan/test/node/node.cpp @@ -80,7 +80,7 @@ TEST(Node, Basic) ASSERT_LE(0, log_sub.start()); node1.getLogger().setLevel(uavcan::protocol::debug::LogLevel::DEBUG); - ASSERT_LE(1, node1.logInfo("test", "6 * 9 = 42")); + node1.logInfo("test", "6 * 9 = 42"); ASSERT_LE(0, node1.spin(uavcan::MonotonicDuration::fromMSec(20))); ASSERT_LE(0, node2.spin(uavcan::MonotonicDuration::fromMSec(20)));