@@ -119,37 +119,44 @@ impl WaitStatus {
119119
120120#[ allow( unused_unsafe) ]
121121fn exited ( status : i32 ) -> bool {
122- libc:: WIFEXITED ( status)
122+ #[ allow( unused_unsafe) ]
123+ unsafe { libc:: WIFEXITED ( status) }
123124}
124125
125126#[ allow( unused_unsafe) ]
126127fn exit_status ( status : i32 ) -> i32 {
127- libc:: WEXITSTATUS ( status)
128+ #[ allow( unused_unsafe) ]
129+ unsafe { libc:: WEXITSTATUS ( status) }
128130}
129131
130132#[ allow( unused_unsafe) ]
131133fn signaled ( status : i32 ) -> bool {
132- libc:: WIFSIGNALED ( status)
134+ #[ allow( unused_unsafe) ]
135+ unsafe { libc:: WIFSIGNALED ( status) }
133136}
134137
135138#[ allow( unused_unsafe) ]
136139fn term_signal ( status : i32 ) -> Result < Signal > {
137- Signal :: try_from ( libc:: WTERMSIG ( status) )
140+ #[ allow( unused_unsafe) ]
141+ Signal :: try_from ( unsafe { libc:: WTERMSIG ( status) } )
138142}
139143
140144#[ allow( unused_unsafe) ]
141145fn dumped_core ( status : i32 ) -> bool {
142- libc:: WCOREDUMP ( status)
146+ #[ allow( unused_unsafe) ]
147+ unsafe { libc:: WCOREDUMP ( status) }
143148}
144149
145150#[ allow( unused_unsafe) ]
146151fn stopped ( status : i32 ) -> bool {
147- libc:: WIFSTOPPED ( status)
152+ #[ allow( unused_unsafe) ]
153+ unsafe { libc:: WIFSTOPPED ( status) }
148154}
149155
150156#[ allow( unused_unsafe) ]
151157fn stop_signal ( status : i32 ) -> Result < Signal > {
152- Signal :: try_from ( libc:: WSTOPSIG ( status) )
158+ #[ allow( unused_unsafe) ]
159+ Signal :: try_from ( unsafe { libc:: WSTOPSIG ( status) } )
153160}
154161
155162#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
@@ -159,7 +166,8 @@ fn syscall_stop(status: i32) -> bool {
159166 // of delivering SIGTRAP | 0x80 as the signal number for syscall
160167 // stops. This allows easily distinguishing syscall stops from
161168 // genuine SIGTRAP signals.
162- libc:: WSTOPSIG ( status) == libc:: SIGTRAP | 0x80
169+ #[ allow( unused_unsafe) ]
170+ unsafe { libc:: WSTOPSIG ( status) == libc:: SIGTRAP | 0x80 }
163171}
164172
165173#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
@@ -169,7 +177,8 @@ fn stop_additional(status: i32) -> c_int {
169177
170178#[ allow( unused_unsafe) ]
171179fn continued ( status : i32 ) -> bool {
172- libc:: WIFCONTINUED ( status)
180+ #[ allow( unused_unsafe) ]
181+ unsafe { libc:: WIFCONTINUED ( status) }
173182}
174183
175184impl WaitStatus {
0 commit comments