From 83cfa24bae0edcfcd0ac85a50bbcc8745c86103e Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 6 Apr 2023 12:02:49 +0800 Subject: [PATCH] suppress warn Signed-off-by: fufesou --- libs/hbb_common/src/platform/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/hbb_common/src/platform/mod.rs b/libs/hbb_common/src/platform/mod.rs index b109ac683..fd57476c0 100644 --- a/libs/hbb_common/src/platform/mod.rs +++ b/libs/hbb_common/src/platform/mod.rs @@ -61,13 +61,13 @@ extern "C" fn breakdown_signal_handler(sig: i32) { exit(0); } -pub fn register_breakdown_handler(callback: T) +pub fn register_breakdown_handler(_callback: T) where T: Fn() + 'static, { #[cfg(not(debug_assertions))] unsafe { - GLOBAL_CALLBACK = Some(Box::new(callback)); + GLOBAL_CALLBACK = Some(Box::new(_callback)); libc::signal(libc::SIGSEGV, breakdown_signal_handler as _); } }