From 04ad7cc41b8c0895008969c0f478dc837a845e4f Mon Sep 17 00:00:00 2001 From: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Tue, 7 May 2024 14:54:53 -0700 Subject: [PATCH] fix: conditionally enable no-unused-parameter fix #316 --- bindings/rust/build.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index c41faf01..6c090a99 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -2,8 +2,10 @@ fn main() { let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); - c_config.flag("-Wno-unused-parameter"); - c_config.std("c11").include(src_dir); + c_config + .std("c11") + .include(src_dir) + .flag_if_supported("-Wno-unused-parameter"); #[cfg(target_env = "msvc")] c_config.flag("-utf-8");