Skip to content

Commit 6d8ea19

Browse files
n0toosemkroening
authored andcommitted
style(linux): fix function_casts_as_integer lint
Introduced in rust-lang/rust#141470
1 parent d74257a commit 6d8ea19

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/linux/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ impl KickSignal {
6868
extern "C" fn handle_signal(_signal: libc::c_int) {}
6969
// SAFETY: We don't use the `signal`'s return value and use an empty handler.
7070
// (Sidenote: SIG_DFL and SIG_IGN don't do the trick.)
71-
let res = unsafe { libc::signal(Self::get(), handle_signal as libc::sighandler_t) };
71+
let res = unsafe {
72+
libc::signal(
73+
Self::get(),
74+
handle_signal as *const () as libc::sighandler_t,
75+
)
76+
};
7277
nix::errno::Errno::result(res).map(drop)
7378
}
7479

0 commit comments

Comments
 (0)