From 64d9cf323d6a49904f6a6ed2635efba2af782a2e Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Wed, 18 Oct 2023 01:17:17 +0800 Subject: [PATCH] chore(local): local-redir build warning fixed on Windows --- crates/shadowsocks-service/src/local/redir/sys/mod.rs | 1 + crates/shadowsocks-service/src/local/redir/udprelay/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/shadowsocks-service/src/local/redir/sys/mod.rs b/crates/shadowsocks-service/src/local/redir/sys/mod.rs index 7cb39d74af3b..6b7d18790d55 100644 --- a/crates/shadowsocks-service/src/local/redir/sys/mod.rs +++ b/crates/shadowsocks-service/src/local/redir/sys/mod.rs @@ -25,6 +25,7 @@ where } #[cfg(windows)] +#[allow(dead_code)] pub fn set_ipv6_only(socket: &S, ipv6_only: bool) -> io::Result<()> where S: std::os::windows::io::AsRawSocket, diff --git a/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs b/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs index 721315b290a8..0cb931920684 100644 --- a/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs +++ b/crates/shadowsocks-service/src/local/redir/udprelay/mod.rs @@ -101,6 +101,7 @@ impl UdpInboundWrite for UdpRedirInboundWriter { // then we should always use IPv6 sockets for sending IPv4 packets. static SUPPORT_IPV6_TRANSPARENT: AtomicBool = AtomicBool::new(true); + #[allow(unused_mut)] let mut addr = match *remote_addr { Address::SocketAddress(sa) => { if SUPPORT_IPV6_TRANSPARENT.load(Ordering::Relaxed) {