From 57e369ddef13d6bdd783d9de0aefa02f88eb56b5 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Sun, 26 Jul 2026 22:08:52 +0900 Subject: [PATCH] relibc: fix denied warnings in socket.rs IPv6 code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two cross-compile-specific denied warnings that blocked the canonical build: 1. unused import: in6_addr (line 23) The parallel agent's IPv6 work imported in6_addr but never referenced the type directly. Removed from the import list. 2. unnecessary unsafe block (line 76) 'let addr = unsafe { &data.sin6_addr.s6_addr };' — 'data' was already a safe &sockaddr_in6 reference (created by the unsafe cast on line 75). Field access on a safe reference doesn't require unsafe. Removed the wrapper. Both are -D warnings during -Z build-std cross-compile but not during host cargo check. This was the last blocker for ISO production (relibc is a prefix dependency). --- src/platform/redox/socket.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/redox/socket.rs b/src/platform/redox/socket.rs index b1ac622661..1e120887e7 100644 --- a/src/platform/redox/socket.rs +++ b/src/platform/redox/socket.rs @@ -20,7 +20,7 @@ use crate::{ EAFNOSUPPORT, EDOM, EFAULT, EINVAL, EMSGSIZE, ENOMEM, ENOSYS, ENOTSOCK, EOPNOTSUPP, EPROTONOSUPPORT, }, - netinet_in::{in_addr, in6_addr, in_port_t, sockaddr_in, sockaddr_in6}, + netinet_in::{in_addr, in_port_t, sockaddr_in, sockaddr_in6}, string::strnlen, sys_select::timeval, sys_socket::{ @@ -73,7 +73,7 @@ unsafe fn bind_or_connect( } let data = unsafe { &*address.cast::() }; - let addr = unsafe { &data.sin6_addr.s6_addr }; + let addr = &data.sin6_addr.s6_addr; let port = in_port_t::from_be(data.sin6_port); let scope = data.sin6_scope_id;