From df9779098cd95169ce313fd19230564e75f192e8 Mon Sep 17 00:00:00 2001 From: taks <857tn859@gmail.com> Date: Sat, 18 Nov 2023 23:51:08 +0900 Subject: [PATCH] Fix warnings --- src/ble_device.rs | 1 + src/utilities/os_mbuf.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/ble_device.rs b/src/ble_device.rs index 166336c..8ac73ac 100644 --- a/src/ble_device.rs +++ b/src/ble_device.rs @@ -209,6 +209,7 @@ impl BLEDevice { self._set_own_addr_type(OwnAddrType::Random, true); } + #[allow(unused_variables)] fn _set_own_addr_type(&mut self, own_addr_type: OwnAddrType, use_nrpa: bool) { unsafe { OWN_ADDR_TYPE = own_addr_type; diff --git a/src/utilities/os_mbuf.rs b/src/utilities/os_mbuf.rs index 0982d09..adaa15a 100644 --- a/src/utilities/os_mbuf.rs +++ b/src/utilities/os_mbuf.rs @@ -2,6 +2,8 @@ use core::ffi::c_int; use esp_idf_sys::os_mbuf; /// Allocate a packet header structure from the MSYS pool. See os_msys_register() for a description of MSYS. +#[inline] +#[allow(unused)] pub(crate) fn os_msys_get_pkthdr(dsize: u16, user_hdr_len: u16) -> *mut os_mbuf { #[cfg(not(esp_idf_soc_esp_nimble_controller))] unsafe { @@ -15,6 +17,8 @@ pub(crate) fn os_msys_get_pkthdr(dsize: u16, user_hdr_len: u16) -> *mut os_mbuf } /// Append data onto a mbuf +#[inline] +#[allow(unused)] pub(crate) fn os_mbuf_append(m: *mut os_mbuf, data: &[u8]) -> c_int { #[cfg(not(esp_idf_soc_esp_nimble_controller))] unsafe {