Skip to content

Commit 46c767d

Browse files
committed
Revert "Allow unused_unsafe warning"
This reverts commit 234b862.
1 parent 234b862 commit 46c767d

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/sys/quota.rs

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);
2222

2323
impl QuotaCmd {
2424
fn as_int(&self) -> c_int {
25-
#[allow(unused_unsafe)]
2625
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
2726
}
2827
}

src/sys/wait.rs

-9
Original file line numberDiff line numberDiff line change
@@ -118,37 +118,30 @@ impl WaitStatus {
118118
}
119119

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

125124
fn exit_status(status: i32) -> i32 {
126-
#[allow(unused_unsafe)]
127125
unsafe { libc::WEXITSTATUS(status) }
128126
}
129127

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)