From a93fa08e1be4f669bddf5447592419a9400cb985 Mon Sep 17 00:00:00 2001 From: Thomas Vermeilh Date: Tue, 11 May 2021 11:26:21 +0200 Subject: [PATCH] refactor: show cc compilation wanings --- yara-sys/build.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/yara-sys/build.rs b/yara-sys/build.rs index 7762cfe..65ce214 100644 --- a/yara-sys/build.rs +++ b/yara-sys/build.rs @@ -90,7 +90,14 @@ mod build { }; // Unfortunately, YARA compilation produces lots of warnings - cc.warnings(false); + // Ignore some of them. + cc.flag_if_supported("-Wno-deprecated-declarations") + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-function") + .flag_if_supported("-Wno-cast-function-type") + .flag_if_supported("-Wno-type-limits") + .flag_if_supported("-Wno-tautological-constant-out-of-range-compare") + .flag_if_supported("-Wno-sign-compare"); // maybe this one shouldn't be silenced. cc.compile("yara");