@@ -116,59 +116,50 @@ impl WaitStatus {
116
116
}
117
117
}
118
118
119
- #[ allow( unused_unsafe) ]
120
119
fn exited ( status : i32 ) -> bool {
121
- unsafe { libc:: WIFEXITED ( status) }
120
+ libc:: WIFEXITED ( status)
122
121
}
123
122
124
- #[ allow( unused_unsafe) ]
125
123
fn exit_status ( status : i32 ) -> i32 {
126
- unsafe { libc:: WEXITSTATUS ( status) }
124
+ libc:: WEXITSTATUS ( status)
127
125
}
128
126
129
- #[ allow( unused_unsafe) ]
130
127
fn signaled ( status : i32 ) -> bool {
131
- unsafe { libc:: WIFSIGNALED ( status) }
128
+ libc:: WIFSIGNALED ( status)
132
129
}
133
130
134
- #[ allow( unused_unsafe) ]
135
131
fn term_signal ( status : i32 ) -> Result < Signal > {
136
- Signal :: try_from ( unsafe { libc:: WTERMSIG ( status) } )
132
+ Signal :: try_from ( libc:: WTERMSIG ( status) )
137
133
}
138
134
139
- #[ allow( unused_unsafe) ]
140
135
fn dumped_core ( status : i32 ) -> bool {
141
- unsafe { libc:: WCOREDUMP ( status) }
136
+ libc:: WCOREDUMP ( status)
142
137
}
143
138
144
- #[ allow( unused_unsafe) ]
145
139
fn stopped ( status : i32 ) -> bool {
146
- unsafe { libc:: WIFSTOPPED ( status) }
140
+ libc:: WIFSTOPPED ( status)
147
141
}
148
142
149
- #[ allow( unused_unsafe) ]
150
143
fn stop_signal ( status : i32 ) -> Result < Signal > {
151
- Signal :: try_from ( unsafe { libc:: WSTOPSIG ( status) } )
144
+ Signal :: try_from ( libc:: WSTOPSIG ( status) )
152
145
}
153
146
154
147
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
155
- #[ allow( unused_unsafe) ]
156
148
fn syscall_stop ( status : i32 ) -> bool {
157
149
// From ptrace(2), setting PTRACE_O_TRACESYSGOOD has the effect
158
150
// of delivering SIGTRAP | 0x80 as the signal number for syscall
159
151
// stops. This allows easily distinguishing syscall stops from
160
152
// genuine SIGTRAP signals.
161
- unsafe { libc:: WSTOPSIG ( status) == libc:: SIGTRAP | 0x80 }
153
+ libc:: WSTOPSIG ( status) == libc:: SIGTRAP | 0x80
162
154
}
163
155
164
156
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
165
157
fn stop_additional ( status : i32 ) -> c_int {
166
158
( status >> 16 ) as c_int
167
159
}
168
160
169
- #[ allow( unused_unsafe) ]
170
161
fn continued ( status : i32 ) -> bool {
171
- unsafe { libc:: WIFCONTINUED ( status) }
162
+ libc:: WIFCONTINUED ( status)
172
163
}
173
164
174
165
impl WaitStatus {
0 commit comments