From a40eba8199b48b62cc2295144e21c84e3bb8389e Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 22 Apr 2026 12:07:49 +0800 Subject: [PATCH] fix hosted mode warnings --- services/bao-video/src/main.rs | 3 +++ services/bao1x-emu/src/display.rs | 5 +++++ services/bao1x-emu/src/main.rs | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/bao-video/src/main.rs b/services/bao-video/src/main.rs index bb97270a6..6f71149ce 100644 --- a/services/bao-video/src/main.rs +++ b/services/bao-video/src/main.rs @@ -431,6 +431,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! { let mut bw_thresh: u8 = 128; let mut qr_request: Option = None; let mut kbd_listeners: Vec<(CID, usize)> = Vec::new(); + #[allow(unused_mut)] let mut orientation = DisplayOrientation::Normal; loop { if !is_panic.load(Ordering::Relaxed) { @@ -521,6 +522,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! { } GfxOpcode::KeyPress => { if let Some(scalar) = msg.body.scalar_message() { + #[cfg(not(feature = "hosted-baosec"))] let k = char::from_u32(scalar.arg1 as u32).unwrap_or('\u{0000}'); #[cfg(not(feature = "hosted-baosec"))] // ignore accelerometer reports @@ -975,6 +977,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! { xous::terminate_process(0) } +#[allow(unused_variables)] fn display_timeout_handler(udma_global: &UdmaGlobal, display: &mut Oled128x128) { log::info!("resetting display spim block"); #[cfg(feature = "board-baosec")] diff --git a/services/bao1x-emu/src/display.rs b/services/bao1x-emu/src/display.rs index cc9ff2c34..26e390241 100644 --- a/services/bao1x-emu/src/display.rs +++ b/services/bao1x-emu/src/display.rs @@ -134,6 +134,11 @@ impl<'a> Oled128x128 { unimplemented!("devboot feature does not exist on this platform"); } + pub fn flip_vertical(&mut self, _flip: bool) -> Result<(), xous::Error> { + log::warn!("flipping not implemented"); + Ok(()) + } + pub fn stash(&mut self) { self.stash.copy_from_slice(&self.buffer); } pub fn pop(&mut self) -> Result<(), xous::Error> { diff --git a/services/bao1x-emu/src/main.rs b/services/bao1x-emu/src/main.rs index 9cd433da8..5b0815b5c 100644 --- a/services/bao1x-emu/src/main.rs +++ b/services/bao1x-emu/src/main.rs @@ -134,8 +134,4 @@ fn main() { } } } - xns.unregister_server(sid).unwrap(); - xous::destroy_server(sid).unwrap(); - log::trace!("quitting"); - xous::terminate_process(0) }