From 35ffc72efdbd951b8d9436f236be227cb3068827 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Tue, 20 Aug 2024 16:22:32 -0400 Subject: [PATCH] silence dead code warnings for windows --- src/read/pipelining.rs | 4 ++++ src/read/split.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/read/pipelining.rs b/src/read/pipelining.rs index 2515c90ba..6fc85c651 100644 --- a/src/read/pipelining.rs +++ b/src/read/pipelining.rs @@ -1,5 +1,7 @@ //! Pipelined extraction into a filesystem directory. +#![cfg_attr(not(unix), allow(dead_code))] + pub mod path_splitting { use displaydoc::Display; use thiserror::Error; @@ -461,6 +463,7 @@ pub mod handle_creation { FSEntry::File(data) => { let key = ZipDataHandle::wrap(data); + #[cfg_attr(not(unix), allow(unused_variables))] if let Some(mode) = data.unix_mode() { /* TODO: consider handling the readonly bit on windows. We don't currently * do this in normal extraction, so we don't need to do this yet for @@ -479,6 +482,7 @@ pub mod handle_creation { assert!(file_handle_mapping.insert(key, handle).is_none()); } FSEntry::Dir(DirEntry { + #[cfg(unix)] properties, children, }) => { diff --git a/src/read/split.rs b/src/read/split.rs index a7afcabbf..5ffa0b34c 100644 --- a/src/read/split.rs +++ b/src/read/split.rs @@ -1,5 +1,7 @@ //! Traits for splitting and teeing file contents into multiple parallel streams. +#![cfg_attr(not(unix), allow(dead_code))] + macro_rules! interruptible_buffered_io_op { ($op:expr) => { match $op { @@ -10,6 +12,7 @@ macro_rules! interruptible_buffered_io_op { }; } +#[cfg_attr(not(unix), allow(unused_macros))] macro_rules! syscall_errno { ($syscall:expr) => { match $syscall {