diff --git a/rclrs/src/dynamic_message.rs b/rclrs/src/dynamic_message.rs index 33b5b6166..c45f91e97 100644 --- a/rclrs/src/dynamic_message.rs +++ b/rclrs/src/dynamic_message.rs @@ -52,11 +52,14 @@ struct MessageTypeName { /// can be used as a factory to create message instances. #[derive(Clone)] pub struct DynamicMessageMetadata { + #[allow(dead_code)] message_type: MessageTypeName, // The library needs to be kept loaded in order to keep the type_support_ptr valid. #[allow(dead_code)] introspection_type_support_library: Arc, + #[allow(dead_code)] type_support_ptr: *const rosidl_message_type_support_t, + #[allow(dead_code)] fini_function: unsafe extern "C" fn(*mut libc::c_void), }