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