From 5cec332b3f5c049724dffa0069b425baed76eea8 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 | 5 +++++ src/read/split.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/read/pipelining.rs b/src/read/pipelining.rs index 2515c90ba..3212c4f85 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 @@ -478,6 +481,7 @@ pub mod handle_creation { .open(path)?; assert!(file_handle_mapping.insert(key, handle).is_none()); } + #[cfg_attr(not(unix), allow(unused_variables))] FSEntry::Dir(DirEntry { properties, children, @@ -555,6 +559,7 @@ pub mod handle_creation { .unwrap(); /* (2) Generate handles. */ + #[cfg_attr(not(unix), allow(unused_variables))] let AllocatedHandles { file_handle_mapping, perms_todo, 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 {