Skip to content

Commit

Permalink
Fix pointer related issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
  • Loading branch information
Blast545 committed May 19, 2020
1 parent f28f663 commit aa17929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rcl/test/rcl/test_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,19 +306,19 @@ TEST_F(CLASSNAME(TestPublisherFixture, RMW_IMPLEMENTATION), test_publisher_loan)
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
});

test_msgs__msg__Strings * msg_loaned;
test_msgs__msg__Strings * msg_loaned = nullptr;
test_msgs__msg__Strings ** msg_loaned_ptr = &msg_loaned;
if (rcl_publisher_can_loan_messages(&publisher)) {
EXPECT_EQ(
RCL_RET_OK, rcl_borrow_loaned_message(
&publisher,
ts,
reinterpret_cast<void **>(&msg_loaned_ptr)));
reinterpret_cast<void **>(msg_loaned_ptr)));
ASSERT_TRUE(rosidl_runtime_c__String__assign(&(msg_loaned->string_value), "testing"));
EXPECT_EQ(
RCL_RET_OK, rcl_publish_loaned_message(
&publisher,
&msg_loaned,
msg_loaned,
nullptr));
}
}
Expand Down

0 comments on commit aa17929

Please sign in to comment.