Some functions with unused return value explicitly casted to (void)

This commit is contained in:
Pavel Kirienko 2014-04-01 00:13:43 +04:00
parent 5f8eb61a6f
commit 0b2c00307d
2 changed files with 4 additions and 5 deletions

View File

@ -16,11 +16,11 @@ __attribute__ ((format(printf, 2, 3)))
static void UAVCAN_TRACE(const char* src, const char* fmt, ...)
{
va_list args;
std::printf("UAVCAN: %s: ", src);
(void)std::printf("UAVCAN: %s: ", src);
va_start(args, fmt);
std::vprintf(fmt, args);
(void)std::vprintf(fmt, args);
va_end(args);
std::puts("");
(void)std::puts("");
}
#else

View File

@ -159,7 +159,6 @@ void CanTxQueue::push(const CanFrame& frame, MonotonicTime tx_deadline, Qos qos,
if (praw == NULL)
{
return; // Seems that there is no memory at all.
}
Entry* entry = new (praw) Entry(frame, tx_deadline, qos, flags);
assert(entry);
@ -405,7 +404,7 @@ int CanIOManager::receive(CanRxFrame& out_frame, MonotonicTime blocking_deadline
{
if (masks.write & (1 << i))
{
sendFromTxQueue(i);
(void)sendFromTxQueue(i); // It may fail, we don't care. Requested operation was receive, not send.
}
}