mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:33:34 +08:00
Coverity 1304857 1304856 1304855
This commit is contained in:
@@ -438,6 +438,7 @@ static void runMainNode(const uavcan_linux::NodePtr& node)
|
||||
auto timer = node->makeTimer(uavcan::MonotonicDuration::fromMSec(10000), [&node](const uavcan::TimerEvent&)
|
||||
{
|
||||
node->logInfo("timer", "Your time is running out.");
|
||||
// coverity[dont_call]
|
||||
node->setVendorSpecificStatusCode(static_cast<std::uint16_t>(std::rand()));
|
||||
});
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
|
||||
auto do_nothing_once_a_minute = [&node](const uavcan::TimerEvent&)
|
||||
{
|
||||
node->logInfo("timer", "Another minute passed...");
|
||||
// coverity[dont_call]
|
||||
node->setVendorSpecificStatusCode(static_cast<std::uint16_t>(std::rand())); // Setting to an arbitrary value
|
||||
};
|
||||
auto timer = node->makeTimer(uavcan::MonotonicDuration::fromMSec(60000), do_nothing_once_a_minute);
|
||||
|
||||
Reference in New Issue
Block a user