mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
fix(build): eliminate unused import and dead code warnings on Unix
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
use std::{fs, io, os::unix::fs::PermissionsExt, path::PathBuf, sync::Arc};
|
use std::{fs, io, os::unix::fs::PermissionsExt, path::PathBuf, sync::Arc};
|
||||||
|
|
||||||
use anyhow::{Context, bail, ensure};
|
use anyhow::{Context, ensure};
|
||||||
use gpapi::{
|
use gpapi::{
|
||||||
hip::HipSource,
|
hip::HipSource,
|
||||||
os_profile::{ClientOs, HostIdentity, OsProfile, OsProfileBuilder},
|
os_profile::{ClientOs, HostIdentity, OsProfile, OsProfileBuilder},
|
||||||
@@ -103,7 +103,7 @@ pub(crate) fn resolve(
|
|||||||
#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")))]
|
#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")))]
|
||||||
{
|
{
|
||||||
let _ = (approval_id, desktop_uid);
|
let _ = (approval_id, desktop_uid);
|
||||||
bail!("Root HIP script approvals are unavailable on this platform")
|
anyhow::bail!("Root HIP script approvals are unavailable on this platform")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
#[cfg(any(target_os = "freebsd", target_os = "openbsd", target_os = "macos"))]
|
||||||
pub(super) fn routes(control: &dyn CollectionControl) -> anyhow::Result<Vec<RouteContext>> {
|
pub(super) fn routes(control: &dyn CollectionControl) -> anyhow::Result<Vec<RouteContext>> {
|
||||||
let mut routes = Vec::new();
|
let mut routes = Vec::new();
|
||||||
for family in ["inet", "inet6"] {
|
for family in ["inet", "inet6"] {
|
||||||
|
|||||||
Reference in new issue
Block a user