1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-12 11:00:47 +02:00

Fixed compiler warnings

This commit is contained in:
Simon Rasmussen
2017-07-09 02:45:58 +02:00
parent fdaaacfe2c
commit 577fcdbf98
10 changed files with 30 additions and 36 deletions

View File

@@ -33,17 +33,16 @@ public:
bp.parse(packet_size);
bp.parse(type);
//quietly ignore the intial version message
if (type == message_type::ROBOT_MESSAGE || ((int)type) == 5)
{
bp.consume();
return true;
}
if (type != message_type::ROBOT_STATE)
{
LOG_WARN("Invalid state message type recieved: %u", static_cast<uint8_t>(type));
return false;
//quietly ignore the intial version message
if(type != message_type::ROBOT_MESSAGE)
{
LOG_WARN("Invalid state message type recieved: %u", static_cast<uint8_t>(type));
}
bp.consume();
return true;
}
while (!bp.empty())
@@ -60,8 +59,6 @@ public:
return false;
}
//LOG_DEBUG("sub-packet size: %" PRIu32, sub_size);
// deconstruction of a sub parser will increment the position of the parent parser
BinParser sbp(bp, sub_size);
sbp.consume(sizeof(sub_size));
@@ -73,7 +70,6 @@ public:
if (packet == nullptr)
{
sbp.consume();
//LOG_DEBUG("Skipping sub-packet of type %d", type);
continue;
}