From 38bc03a8bcdcfcf80306c8feb8f2409a00976f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Quentin?= Date: Mon, 6 Jan 2025 16:17:53 +0100 Subject: [PATCH] Cast --- esp-wifi/src/compat/misc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp-wifi/src/compat/misc.rs b/esp-wifi/src/compat/misc.rs index c51378795..9f645f2d2 100644 --- a/esp-wifi/src/compat/misc.rs +++ b/esp-wifi/src/compat/misc.rs @@ -31,7 +31,7 @@ unsafe extern "C" fn strdup(str: *const core::ffi::c_char) -> *const core::ffi:: let len = s.count_bytes() + 1; let p = malloc(len); if !p.is_null() { - core::ptr::copy_nonoverlapping(str, p as *mut i8, len); + core::ptr::copy_nonoverlapping(str, p.cast(), len); } p.cast() }