Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed the improper_ctypes_definitions lint on our generated rcl bindings #341

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

maspe36
Copy link
Collaborator

@maspe36 maspe36 commented Oct 28, 2023

In rust >1.71 our good friend #320 is a warning once again.

--- stderr: rclrs                                                                                                                                                   
warning: `extern` fn uses type `u128`, which is not FFI-safe
    --> /home/sam/rust_ws/build/rclrs/debug/build/rclrs-cc216d91fb97e34d/out/rcl_bindings_generated.rs:5008:9
     |
5008 | /         unsafe extern "C" fn(
5009 | |             serialization_support: *mut rosidl_dynamic_typesupport_serialization_support_impl_t,
5010 | |             dynamic_data: *mut rosidl_dynamic_typesupport_dynamic_data_impl_t,
5011 | |             id: rosidl_dynamic_typesupport_member_id_t,
5012 | |             value: u128,
5013 | |         ) -> rcutils_ret_t,
     | |__________________________^ not FFI-safe
     |
     = note: 128-bit integers don't currently have a known stable ABI
     = note: `#[warn(improper_ctypes_definitions)]` on by default

More on the lint here improper_ctypes_definitions

Copy link
Collaborator

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fair. Cuts down on the number of warnings generated for things we can't do much about, at least.

@esteve
Copy link
Collaborator

esteve commented Oct 31, 2023

@maspe36 LGTM, thanks!

@esteve esteve merged commit c2d8a29 into ros2-rust:main Oct 31, 2023
3 checks passed
@maspe36 maspe36 deleted the clippy_ffi_warning_2 branch November 4, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants