Skip to content

Commit

Permalink
silence dead code warnings for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 21, 2024
1 parent 4bbc351 commit 5cec332
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/read/pipelining.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions src/read/split.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 5cec332

Please sign in to comment.