about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/alloc.rs
diff options
context:
space:
mode:
authorIan Chamberlain <ian.h.chamberlain@gmail.com>2024-07-19 20:08:40 -0400
committerIan Chamberlain <ian.h.chamberlain@gmail.com>2024-07-21 20:12:54 -0400
commitdba6b74dd8b31cdb3ca0aba3ed33f644bca42de0 (patch)
tree618819c3fb5ed0f7aa2479e149fabaa36691b5de /library/std/src/sys/pal/unix/alloc.rs
parent9057c3ffec44926d5e149dc13ff3ce1613b69cce (diff)
downloadrust-dba6b74dd8b31cdb3ca0aba3ed33f644bca42de0.tar.gz
rust-dba6b74dd8b31cdb3ca0aba3ed33f644bca42de0.zip
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.
Diffstat (limited to 'library/std/src/sys/pal/unix/alloc.rs')
-rw-r--r--library/std/src/sys/pal/unix/alloc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/alloc.rs b/library/std/src/sys/pal/unix/alloc.rs
index eb3a57c212b..625ba5247f1 100644
--- a/library/std/src/sys/pal/unix/alloc.rs
+++ b/library/std/src/sys/pal/unix/alloc.rs
@@ -67,7 +67,7 @@ cfg_if::cfg_if! {
     ))] {
         #[inline]
         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 {
         #[inline]