refact: suppress warns on macos (#12449)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-08-18 15:09:11 +08:00
committed by GitHub
parent bf24869c6a
commit a22f2108c6
20 changed files with 150 additions and 82 deletions
+4 -1
View File
@@ -119,16 +119,18 @@ pub fn get_wakelock(_display: bool) -> WakeLock {
return crate::platform::WakeLock::new(_display, true, false);
}
#[cfg(any(target_os = "windows", target_os = "linux"))]
pub(crate) struct InstallingService; // please use new
#[cfg(any(target_os = "windows", target_os = "linux"))]
impl InstallingService {
#[cfg(any(target_os = "windows", target_os = "linux"))]
pub fn new() -> Self {
*INSTALLING_SERVICE.lock().unwrap() = true;
Self
}
}
#[cfg(any(target_os = "windows", target_os = "linux"))]
impl Drop for InstallingService {
fn drop(&mut self) {
*INSTALLING_SERVICE.lock().unwrap() = false;
@@ -144,6 +146,7 @@ pub fn is_prelogin() -> bool {
// Note: This method is inefficient on Windows. It will get all the processes.
// It should only be called when performance is not critical.
// If we wanted to get the command line ourselves, there would be a lot of new code.
#[allow(dead_code)]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
fn get_pids_of_process_with_args<S1: AsRef<str>, S2: AsRef<str>>(
name: S1,