mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Some functions with unused return value explicitly casted to (void)
This commit is contained in:
parent
5f8eb61a6f
commit
0b2c00307d
@ -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
|
||||
|
||||
@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user