Skip to content

Commit df3a303

Browse files
authored
Removed warning test_qos (#2859)
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
1 parent 373a63c commit df3a303

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rclcpp/test/rclcpp/test_qos.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ TEST(TestQoS, from_rmw_validity)
277277
{
278278
rmw_qos_profile_t invalid_qos;
279279
memset(&invalid_qos, 0, sizeof(invalid_qos));
280-
reinterpret_cast<uint32_t &>(invalid_qos.history) = 999;
280+
unsigned int n = 999;
281+
memcpy(&invalid_qos.history, &n, sizeof(n));
281282

282283
EXPECT_THROW({
283284
rclcpp::QoSInitialization::from_rmw(invalid_qos);

0 commit comments

Comments
 (0)