diff --git a/README.md b/README.md index 4b427fa..b07cf26 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ What works? Changelog -------------------- #### [Unreleased] +- Fix cfg warnings +- More convinent one time parameter access #### [0.9.1] - 2024-10-12 - Minor code fixes: , diff --git a/r2r_common/src/lib.rs b/r2r_common/src/lib.rs index 36f333a..300345f 100644 --- a/r2r_common/src/lib.rs +++ b/r2r_common/src/lib.rs @@ -150,6 +150,10 @@ pub fn print_cargo_ros_distro() { } } +#[cfg(feature = "doc-only")] +pub fn print_cargo_used_cfgs(_message_cfgs: &[&str]) {} + +#[cfg(not(feature = "doc-only"))] pub fn print_cargo_used_cfgs(message_cfgs: &[&str]) { // Declare all supported ros distros as cfg directives for cargo for d in SUPPORTED_ROS_DISTROS { diff --git a/r2r_rcl/src/lib.rs b/r2r_rcl/src/lib.rs index 9a33486..b55335f 100644 --- a/r2r_rcl/src/lib.rs +++ b/r2r_rcl/src/lib.rs @@ -1,12 +1,12 @@ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] -#![allow(improper_ctypes)] #![allow(dead_code)] // Silence "`extern` fn uses type `u128`, which is not FFI-safe" // As of rustc 1.78, this has been fixed. // It could be good to still warn if building with an older rust version. #![allow(improper_ctypes)] +#![allow(improper_ctypes_definitions)] include!(concat!(env!("OUT_DIR"), "/rcl_bindings.rs")); use std::ffi::{CStr, CString};