Remove warnings (#1609)

* two falgs

* UNIX ONLY FLAGS

* moa

* FMT
This commit is contained in:
Dongjia "toka" Zhang 2023-10-05 15:25:55 +02:00 committed by GitHub
parent 74783c2027
commit f17e49e9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 7 deletions

View File

@ -28,7 +28,8 @@
clippy::missing_panics_doc,
clippy::missing_docs_in_private_items,
clippy::module_name_repetitions,
clippy::ptr_cast_constness
clippy::ptr_cast_constness,
clippy::negative_feature_names
)]
#![cfg_attr(not(test), warn(
missing_debug_implementations,

View File

@ -58,6 +58,9 @@ fn main() {
let mut sancov_cmp = cc::Build::new();
#[cfg(unix)]
sancov_cmp.flag("-Wno-sign-compare");
#[cfg(feature = "sancov_value_profile")]
{
sancov_cmp.define("SANCOV_VALUE_PROFILE", "1");
@ -150,11 +153,25 @@ fn main() {
println!("cargo:rerun-if-changed=src/cmplog.h");
println!("cargo:rerun-if-changed=src/cmplog.c");
cc::Build::new()
.define("CMPLOG_MAP_W", Some(&*format!("{cmplog_map_w}")))
.define("CMPLOG_MAP_H", Some(&*format!("{cmplog_map_h}")))
.file(src_dir.join("cmplog.c"))
.compile("cmplog");
#[cfg(unix)]
{
cc::Build::new()
.flag("-Wno-pointer-sign") // UNIX ONLY FLAGS
.flag("-Wno-sign-compare")
.define("CMPLOG_MAP_W", Some(&*format!("{cmplog_map_w}")))
.define("CMPLOG_MAP_H", Some(&*format!("{cmplog_map_h}")))
.file(src_dir.join("cmplog.c"))
.compile("cmplog");
}
#[cfg(not(unix))]
{
cc::Build::new()
.define("CMPLOG_MAP_W", Some(&*format!("{cmplog_map_w}")))
.define("CMPLOG_MAP_H", Some(&*format!("{cmplog_map_h}")))
.file(src_dir.join("cmplog.c"))
.compile("cmplog");
}
#[cfg(unix)]
{

View File

@ -17,7 +17,8 @@ The tinyinst module for `LibAFL`.
clippy::missing_panics_doc,
clippy::missing_docs_in_private_items,
clippy::module_name_repetitions,
clippy::unreadable_literal
clippy::unreadable_literal,
clippy::negative_feature_names
)]
#![cfg_attr(not(test), warn(
missing_debug_implementations,