Fix warnings when checking armv6k-nintendo-3ds

Also fix one instance of unsafe_op_in_unsafe_fn that's specific to
horizon + vita - most others should be common with other code.
This commit is contained in:
Ian Chamberlain 2024-07-19 20:08:40 -04:00
parent 9057c3ffec
commit dba6b74dd8
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
4 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
//! Definitions for Horizon OS //! Definitions for Horizon OS
#![forbid(unsafe_op_in_unsafe_fn)]
#![stable(feature = "raw_ext", since = "1.1.0")] #![stable(feature = "raw_ext", since = "1.1.0")]
pub mod fs; pub mod fs;

View File

@ -38,6 +38,7 @@ pub type time_t = libc::time_t;
#[repr(C)] #[repr(C)]
#[derive(Clone)] #[derive(Clone)]
#[stable(feature = "raw_ext", since = "1.1.0")] #[stable(feature = "raw_ext", since = "1.1.0")]
#[allow(dead_code)] // This exists for parity with other `raw` modules, but isn't actually used.
pub struct stat { pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")] #[stable(feature = "raw_ext", since = "1.1.0")]
pub st_dev: dev_t, pub st_dev: dev_t,

View File

@ -67,7 +67,7 @@ cfg_if::cfg_if! {
))] { ))] {
#[inline] #[inline]
unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
libc::memalign(layout.align(), layout.size()) as *mut u8 unsafe { libc::memalign(layout.align(), layout.size()) as *mut u8 }
} }
} else { } else {
#[inline] #[inline]

View File

@ -1,4 +1,3 @@
use crate::fmt;
use crate::io; use crate::io;
use crate::num::NonZero; use crate::num::NonZero;
use crate::sys::pal::unix::unsupported::*; use crate::sys::pal::unix::unsupported::*;