summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/quota.rs1
-rw-r--r--src/sys/wait.rs9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/sys/quota.rs b/src/sys/quota.rs
index 1199d5f9..19330132 100644
--- a/src/sys/quota.rs
+++ b/src/sys/quota.rs
@@ -21,6 +21,7 @@ use crate::errno::Errno;
struct QuotaCmd(QuotaSubCmd, QuotaType);
impl QuotaCmd {
+ #[allow(unused_unsafe)]
fn as_int(&self) -> c_int {
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
}
diff --git a/src/sys/wait.rs b/src/sys/wait.rs
index 9825102c..0c040427 100644
--- a/src/sys/wait.rs
+++ b/src/sys/wait.rs
@@ -117,35 +117,43 @@ impl WaitStatus {
}
}
+#[allow(unused_unsafe)]
fn exited(status: i32) -> bool {
unsafe { libc::WIFEXITED(status) }
}
+#[allow(unused_unsafe)]
fn exit_status(status: i32) -> i32 {
unsafe { libc::WEXITSTATUS(status) }
}
+#[allow(unused_unsafe)]
fn signaled(status: i32) -> bool {
unsafe { libc::WIFSIGNALED(status) }
}
+#[allow(unused_unsafe)]
fn term_signal(status: i32) -> Result<Signal> {
Signal::try_from(unsafe { libc::WTERMSIG(status) })
}
+#[allow(unused_unsafe)]
fn dumped_core(status: i32) -> bool {
unsafe { libc::WCOREDUMP(status) }
}
+#[allow(unused_unsafe)]
fn stopped(status: i32) -> bool {
unsafe { libc::WIFSTOPPED(status) }
}
+#[allow(unused_unsafe)]
fn stop_signal(status: i32) -> Result<Signal> {
Signal::try_from(unsafe { libc::WSTOPSIG(status) })
}
#[cfg(any(target_os = "android", target_os = "linux"))]
+#[allow(unused_unsafe)]
fn syscall_stop(status: i32) -> bool {
// From ptrace(2), setting PTRACE_O_TRACESYSGOOD has the effect
// of delivering SIGTRAP | 0x80 as the signal number for syscall
@@ -159,6 +167,7 @@ fn stop_additional(status: i32) -> c_int {
(status >> 16) as c_int
}
+#[allow(unused_unsafe)]
fn continued(status: i32) -> bool {
unsafe { libc::WIFCONTINUED(status) }
}