-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-vxworksTarget: when they made us, they called us Curiosity, and Spirit, and told us to tell you helloTarget: when they made us, they called us Curiosity, and Spirit, and told us to tell you helloT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
To resolve build errors, ununused_unsafe is allowed for target VxWorks.
We use libc::pread as pread64 which is declared as unsafe in libc for VxWorks
https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/unix/fd.rs#L129
We use libc::pwrite as pwrite64 which is also an unsafe fn
https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/unix/fd.rs#L323
Error
error: unnecessary `unsafe` block
--> std/src/sys/alloc/unix.rs:84:23
|
84 | let ret = unsafe { libc::posix_memalign(&mut out, align, layout.size()) };
| ^^^^^^ unnecessary `unsafe` block
error: unnecessary `unsafe` block
--> library/std/src/sys/pal/unix/fd.rs:137:9
|
137 | unsafe {
| ^^^^^^ unnecessary `unsafe` block
|
= note: `-D unused-unsafe` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_unsafe)]`
error: unnecessary `unsafe` block
--> library/std/src/sys/pal/unix/fd.rs:330:9
|
330 | unsafe {
| ^^^^^^ unnecessary `unsafe` block
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-vxworksTarget: when they made us, they called us Curiosity, and Spirit, and told us to tell you helloTarget: when they made us, they called us Curiosity, and Spirit, and told us to tell you helloT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.