Skip to content

Commit af02db6

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

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
@@ -23,7 +23,6 @@ struct QuotaCmd(QuotaSubCmd, QuotaType);
2323
impl QuotaCmd {
2424
#[allow(unused_unsafe)]
2525
fn as_int(&self) -> c_int {
26-
#[allow(unused_unsafe)]
2726
unsafe { libc::QCMD(self.0 as i32, self.1 as i32) }
2827
}
2928
}

src/sys/wait.rs

-9
Original file line numberDiff line numberDiff line change
@@ -119,43 +119,36 @@ impl WaitStatus {
119119

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

126125
#[allow(unused_unsafe)]
127126
fn exit_status(status: i32) -> i32 {
128-
#[allow(unused_unsafe)]
129127
unsafe { libc::WEXITSTATUS(status) }
130128
}
131129

132130
#[allow(unused_unsafe)]
133131
fn signaled(status: i32) -> bool {
134-
#[allow(unused_unsafe)]
135132
unsafe { libc::WIFSIGNALED(status) }
136133
}
137134

138135
#[allow(unused_unsafe)]
139136
fn term_signal(status: i32) -> Result<Signal> {
140-
#[allow(unused_unsafe)]
141137
Signal::try_from(unsafe { libc::WTERMSIG(status) })
142138
}
143139

144140
#[allow(unused_unsafe)]
145141
fn dumped_core(status: i32) -> bool {
146-
#[allow(unused_unsafe)]
147142
unsafe { libc::WCOREDUMP(status) }
148143
}
149144

150145
#[allow(unused_unsafe)]
151146
fn stopped(status: i32) -> bool {
152-
#[allow(unused_unsafe)]
153147
unsafe { libc::WIFSTOPPED(status) }
154148
}
155149

156150
#[allow(unused_unsafe)]
157151
fn stop_signal(status: i32) -> Result<Signal> {
158-
#[allow(unused_unsafe)]
159152
Signal::try_from(unsafe { libc::WSTOPSIG(status) })
160153
}
161154

@@ -166,7 +159,6 @@ fn syscall_stop(status: i32) -> bool {
166159
// of delivering SIGTRAP | 0x80 as the signal number for syscall
167160
// stops. This allows easily distinguishing syscall stops from
168161
// genuine SIGTRAP signals.
169-
#[allow(unused_unsafe)]
170162
unsafe { libc::WSTOPSIG(status) == libc::SIGTRAP | 0x80 }
171163
}
172164

@@ -177,7 +169,6 @@ fn stop_additional(status: i32) -> c_int {
177169

178170
#[allow(unused_unsafe)]
179171
fn continued(status: i32) -> bool {
180-
#[allow(unused_unsafe)]
181172
unsafe { libc::WIFCONTINUED(status) }
182173
}
183174

0 commit comments

Comments
 (0)