mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 15:23:34 +08:00
Strict warnings in the unit tests. This commit needs to be carefully reviewed.
This commit is contained in:
@@ -85,7 +85,7 @@ TEST(Frame, FrameParsing)
|
||||
|
||||
for (unsigned i = 0; i < sizeof(CanFrame::data); i++)
|
||||
{
|
||||
can.data[i] = i | (i << 4);
|
||||
can.data[i] = uint8_t(i | (i << 4));
|
||||
}
|
||||
|
||||
// CAN ID field order: Transfer ID, Last Frame, Frame Index, Source Node ID, Transfer Type, Data Type ID
|
||||
@@ -227,7 +227,7 @@ TEST(Frame, FrameToString)
|
||||
uint8_t data[8];
|
||||
for (unsigned i = 0; i < sizeof(data); i++)
|
||||
{
|
||||
data[i] = i;
|
||||
data[i] = uint8_t(i);
|
||||
}
|
||||
rx_frame.setPayload(data, sizeof(data));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user