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 a3c60fc commit af02db6
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 @@ -23,7 +23,6 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);
impl QuotaCmd {
#[allow(unused_unsafe)]
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 @@ -119,43 +119,36 @@ impl WaitStatus {

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

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

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

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

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

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

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

Expand All @@ -166,7 +159,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 @@ -177,7 +169,6 @@ fn stop_additional(status: i32) -> c_int {

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

Expand Down

0 comments on commit af02db6

Please sign in to comment.