mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 06:17:35 +08:00
Removed excessive void casts
This commit is contained in:
@@ -67,7 +67,7 @@ protected:
|
||||
virtual void registerInternalFailure(const char* msg)
|
||||
{
|
||||
UAVCAN_TRACE("Node", "Internal failure: %s", msg);
|
||||
(void)logError("UAVCAN", msg);
|
||||
logError("UAVCAN", msg);
|
||||
}
|
||||
|
||||
virtual IAllocator& getAllocator() { return pool_allocator_; }
|
||||
|
||||
@@ -51,8 +51,8 @@ static uavcan_linux::NodePtr initNode(const std::vector<std::string>& ifaces, ua
|
||||
* Say Hi to the world.
|
||||
*/
|
||||
node->setStatusOk();
|
||||
(void)node->logInfo("init", "Hello world! I'm [%*], NID %*",
|
||||
node->getNodeStatusProvider().getName().c_str(), int(node->getNodeID().get()));
|
||||
node->logInfo("init", "Hello world! I'm [%*], NID %*",
|
||||
node->getNodeStatusProvider().getName().c_str(), int(node->getNodeID().get()));
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
*/
|
||||
auto do_nothing_once_a_minute = [&node](const uavcan::TimerEvent&)
|
||||
{
|
||||
(void)node->logInfo("timer", "Another minute passed...");
|
||||
node->logInfo("timer", "Another minute passed...");
|
||||
};
|
||||
auto timer = node->makeTimer(uavcan::MonotonicDuration::fromMSec(60000), do_nothing_once_a_minute);
|
||||
|
||||
@@ -102,7 +102,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
const int res = node->spin(uavcan::MonotonicDuration::getInfinite());
|
||||
if (res < 0)
|
||||
{
|
||||
(void)node->logError("spin", "Error %*", res);
|
||||
node->logError("spin", "Error %*", res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
const int res = node->spin(uavcan::MonotonicDuration::getInfinite());
|
||||
if (res < 0)
|
||||
{
|
||||
(void)node->logError("spin", "Error %*", res);
|
||||
node->logError("spin", "Error %*", res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
const int res = node->spin(uavcan::MonotonicDuration::getInfinite());
|
||||
if (res < 0)
|
||||
{
|
||||
(void)node->logError("spin", "Error %*", res);
|
||||
node->logError("spin", "Error %*", res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user