Skip to content

Commit 76cdd45

Browse files
Removed warning test_qos (#2859) (#2925)
(cherry picked from commit df3a303) Signed-off-by: Alejandro Hernandez Cordero <[email protected]> Signed-off-by: Crola1702 <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
1 parent 8e19cba commit 76cdd45

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
@@ -255,7 +255,8 @@ TEST(TestQoS, from_rmw_validity)
255255
{
256256
rmw_qos_profile_t invalid_qos;
257257
memset(&invalid_qos, 0, sizeof(invalid_qos));
258-
reinterpret_cast<uint32_t &>(invalid_qos.history) = 999;
258+
unsigned int n = 999;
259+
memcpy(&invalid_qos.history, &n, sizeof(n));
259260

260261
EXPECT_THROW(
261262
{

0 commit comments

Comments
 (0)