Open biabbas opened 1 month ago
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
https://github.com/rust-lang/libc/pull/3727 Getting this into a libc release would probably solve this.
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