start adding some clippy lints to Cargo.toml

This commit is contained in:
auronandace
2026-02-06 14:53:59 +00:00
parent cee50ab8c7
commit 473bf0389a
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -19,6 +19,12 @@ members = [
]
exclude = ["tests", "dlmalloc-rs"]
[workspace.lints.clippy]
ptr_cast_constness = "warn"
[lints.clippy]
ptr_cast_constness = "warn"
[build-dependencies]
cc = "1"
+1 -1
View File
@@ -59,7 +59,7 @@ pub unsafe extern "C" fn pthread_setspecific(key: pthread_key_t, value: *const c
});
//println!("Valid key for pthread_setspecific key {:#0x} value {:p} (was {:p})", key, value, record.data);
record.data = value as *mut c_void;
record.data = value.cast_mut();
0
}
+1 -1
View File
@@ -108,7 +108,7 @@ impl LinkMap {
(*map).l_addr = l_addr;
(*map).l_ld = l_ld;
let c_name = CString::new(name).unwrap();
(*map).l_name = c_name.into_raw() as *const c_char;
(*map).l_name = c_name.into_raw().cast_const();
}
map
}