Strict warnings in the unit tests. This commit needs to be carefully reviewed.

This commit is contained in:
Pavel Kirienko
2014-08-28 04:54:59 +04:00
parent d9d6e80aea
commit b09bfab117
27 changed files with 205 additions and 178 deletions
+3 -3
View File
@@ -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;