Skip to content

Commit

Permalink
Revert "Allow unused_unsafe warning"
Browse files Browse the repository at this point in the history
This reverts commit 234b862.
  • Loading branch information
xonatius committed Sep 20, 2020
1 parent 234b862 commit 46c767d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/sys/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);

impl QuotaCmd {
fn as_int(&self) -> c_int {
#[allow(unused_unsafe)]
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
}
}
Expand Down
9 changes: 0 additions & 9 deletions src/sys/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,37 +118,30 @@ impl WaitStatus {
}

fn exited(status: i32) -> bool {
#[allow(unused_unsafe)]
unsafe { libc::WIFEXITED(status) }
}

fn exit_status(status: i32) -> i32 {
#[allow(unused_unsafe)]
unsafe { libc::WEXITSTATUS(status) }
}

fn signaled(status: i32) -> bool {
#[allow(unused_unsafe)]
unsafe { libc::WIFSIGNALED(status) }
}

fn term_signal(status: i32) -> Result<Signal> {
#[allow(unused_unsafe)]
Signal::try_from(unsafe { libc::WTERMSIG(status) })
}

fn dumped_core(status: i32) -> bool {
#[allow(unused_unsafe)]
unsafe { libc::WCOREDUMP(status) }
}

fn stopped(status: i32) -> bool {
#[allow(unused_unsafe)]
unsafe { libc::WIFSTOPPED(status) }
}

fn stop_signal(status: i32) -> Result<Signal> {
#[allow(unused_unsafe)]
Signal::try_from(unsafe { libc::WSTOPSIG(status) })
}

Expand All @@ -158,7 +151,6 @@ fn syscall_stop(status: i32) -> bool {
// of delivering SIGTRAP | 0x80 as the signal number for syscall
// stops. This allows easily distinguishing syscall stops from
// genuine SIGTRAP signals.
#[allow(unused_unsafe)]
unsafe { libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80 }
}

Expand All @@ -168,7 +160,6 @@ fn stop_additional(status: i32) -> c_int {
}

fn continued(status: i32) -> bool {
#[allow(unused_unsafe)]
unsafe { libc::WIFCONTINUED(status) }
}

Expand Down

0 comments on commit 46c767d

Please sign in to comment.