Merge branch 'add-clippy' into 'master'
start adding some clippy lints to Cargo.toml See merge request redox-os/relibc!963
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user