mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:33:33 +08:00
Strict warnings in the unit tests. This commit needs to be carefully reviewed.
This commit is contained in:
@@ -13,7 +13,7 @@ static int sendOne(uavcan::TransferSender& sender, const std::string& data,
|
||||
uint64_t monotonic_tx_deadline, uint64_t monotonic_blocking_deadline,
|
||||
uavcan::TransferType transfer_type, uavcan::NodeID dst_node_id)
|
||||
{
|
||||
return sender.send(reinterpret_cast<const uint8_t*>(data.c_str()), data.length(),
|
||||
return sender.send(reinterpret_cast<const uint8_t*>(data.c_str()), unsigned(data.length()),
|
||||
uavcan::MonotonicTime::fromUSec(monotonic_tx_deadline),
|
||||
uavcan::MonotonicTime::fromUSec(monotonic_blocking_deadline), transfer_type, dst_node_id);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ static int sendOne(uavcan::TransferSender& sender, const std::string& data,
|
||||
uint64_t monotonic_tx_deadline, uint64_t monotonic_blocking_deadline,
|
||||
uavcan::TransferType transfer_type, uavcan::NodeID dst_node_id, uavcan::TransferID tid)
|
||||
{
|
||||
return sender.send(reinterpret_cast<const uint8_t*>(data.c_str()), data.length(),
|
||||
return sender.send(reinterpret_cast<const uint8_t*>(data.c_str()), unsigned(data.length()),
|
||||
uavcan::MonotonicTime::fromUSec(monotonic_tx_deadline),
|
||||
uavcan::MonotonicTime::fromUSec(monotonic_blocking_deadline), transfer_type, dst_node_id, tid);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ TEST(TransferSender, Basic)
|
||||
/*
|
||||
* Receiving on the other side.
|
||||
*/
|
||||
for (int i = 0; i < driver.getNumIfaces(); i++) // Moving the frames from TX to RX side
|
||||
for (uint8_t i = 0; i < driver.getNumIfaces(); i++) // Moving the frames from TX to RX side
|
||||
{
|
||||
CanIfaceMock& iface = driver.ifaces.at(i);
|
||||
std::cout << "Num frames: " << iface.tx.size() << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user