From 8714310468e358afb81709431a6feecfb778a7ad Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 24 Apr 2022 18:18:11 +0200 Subject: [PATCH] Silence dead code warnings in standalone wrapper These were kept in as a reminder, but since standalone has been merged into master these should be silenced as there are relevant TODOs for the missing features in place already. --- src/wrapper/standalone.rs | 2 +- src/wrapper/standalone/context.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wrapper/standalone.rs b/src/wrapper/standalone.rs index eeb10509..5636acb0 100644 --- a/src/wrapper/standalone.rs +++ b/src/wrapper/standalone.rs @@ -56,7 +56,7 @@ pub fn nih_export_standalone() -> bool { /// The same as [`nih_export_standalone()`], but with the arguments taken from an iterator instead /// of using [`std::env::args()`]. pub fn nih_export_standalone_with_args>( - args: Args, + _args: Args, ) -> bool { setup_logger(); diff --git a/src/wrapper/standalone/context.rs b/src/wrapper/standalone/context.rs index f45e5590..9db9b2f7 100644 --- a/src/wrapper/standalone/context.rs +++ b/src/wrapper/standalone/context.rs @@ -23,6 +23,7 @@ pub(crate) struct WrapperGuiContext { /// can hold on to lock guards for event queues. Otherwise reading these events would require /// constant unnecessary atomic operations to lock the uncontested RwLocks. pub(crate) struct WrapperProcessContext<'a, P: Plugin, B: Backend> { + #[allow(dead_code)] pub(super) wrapper: &'a Wrapper, // TODO: Events // pub(super) input_events_guard: AtomicRefMut<'a, VecDeque>, @@ -66,7 +67,7 @@ impl GuiContext for WrapperGuiContext { todo!("WrapperGuiContext::get_state()"); } - fn set_state(&self, state: crate::wrapper::state::PluginState) { + fn set_state(&self, __state: crate::wrapper::state::PluginState) { nih_debug_assert_failure!("TODO: WrapperGuiContext::set_state()"); } } @@ -87,13 +88,13 @@ impl ProcessContext for WrapperProcessContext<'_, P, B> { None } - fn send_event(&mut self, event: NoteEvent) { + fn send_event(&mut self, _event: NoteEvent) { nih_debug_assert_failure!("TODO: WrapperProcessContext::send_event()"); // self.output_events_guard.push_back(event); } - fn set_latency_samples(&self, samples: u32) { + fn set_latency_samples(&self, _samples: u32) { nih_debug_assert_failure!("TODO: WrapperProcessContext::set_latency_samples()"); } }