diff --git a/userspace/ksud/src/boot_patch.rs b/userspace/ksud/src/boot_patch.rs index db3ff612bb62..395d15e9467e 100644 --- a/userspace/ksud/src/boot_patch.rs +++ b/userspace/ksud/src/boot_patch.rs @@ -399,6 +399,7 @@ fn find_magiskboot(magiskboot_path: Option, workdir: &Path) -> Result

, kmi: &str, @@ -408,10 +409,11 @@ fn find_boot_image( partition: &Option, ) -> Result<(PathBuf, Option)> { let bootimage; - let mut bootdevice = None; + let bootdevice; if let Some(ref image) = *image { ensure!(image.exists(), "boot image not found"); bootimage = std::fs::canonicalize(image)?; + bootdevice = None; } else { #[cfg(not(target_os = "android"))] { diff --git a/userspace/ksud/src/defs.rs b/userspace/ksud/src/defs.rs index 15419b40a0f0..d614fdf8e010 100644 --- a/userspace/ksud/src/defs.rs +++ b/userspace/ksud/src/defs.rs @@ -42,6 +42,7 @@ mod android { pub const BACKUP_FILENAME: &str = "stock_image.sha1"; } +#[cfg_attr(not(target_os = "android"), allow(dead_code))] pub const VERSION_CODE: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_CODE")); pub const VERSION_NAME: &str = include_str!(concat!(env!("OUT_DIR"), "/VERSION_NAME"));