Skip to content

Commit ca5636b

Browse files
committed
Fixes for VS17
1 parent 9ef3164 commit ca5636b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

c/test/test_bitfield_macros.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
namespace {
2121

2222
TEST(BitfieldMacros, test_nav_bitfields) {
23-
sbp_msg_gps_time_t gps_t = {
24-
.wn = 1, .tow = 100, .ns_residual = 1, .flags = 0};
23+
sbp_msg_gps_time_t gps_t = {};
24+
gps_t.wn = 1;
25+
gps_t.tow = 100;
26+
gps_t.ns_residual = 1;
2527

2628
SBP_GPS_TIME_TIME_SOURCE_SET(gps_t.flags, SBP_GPS_TIME_TIME_SOURCE_NONE);
2729
EXPECT_EQ(gps_t.flags, 0);
@@ -62,8 +64,7 @@ TEST(BitfieldMacros, test_imu_bitfields) {
6264
}
6365

6466
TEST(BitfieldMacros, test_ins_status_bitfields) {
65-
// TODO(?) : This test case currently failing
66-
sbp_msg_ins_status_t ins_status = {.flags = 0};
67+
sbp_msg_ins_status_t ins_status = {};
6768
SBP_INS_STATUS_INS_TYPE_SET(
6869
ins_status.flags, SBP_INS_STATUS_INS_TYPE_SMOOTHPOSE_LOOSELY_COUPLED);
6970
EXPECT_EQ(ins_status.flags, 0);

c/test/test_utils.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace utils {
44

5-
const void* DUMMY_MEMORY_FOR_CALLBACKS = (void*)0xdeadbeef;
6-
const void* DUMMY_MEMORY_FOR_IO = (void*)0xdead0000;
5+
const void* DUMMY_MEMORY_FOR_CALLBACKS = reinterpret_cast<void*>(0xdeadbeef);
6+
const void* DUMMY_MEMORY_FOR_IO = reinterpret_cast<void*>(0xdead0000);
77

88
namespace io {
99

docs/sbp.pdf

-268 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)