This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new b7674a1d9 nimble/host: fix unused variable warnings
b7674a1d9 is described below
commit b7674a1d9e2d6bca64bf290cadabb3310e8ef259
Author: Oleksandr Nychyporuk <[email protected]>
AuthorDate: Sat Dec 20 17:36:08 2025 +0200
nimble/host: fix unused variable warnings
Move variable declarations under a conditional compilation block.
This prevents compiler warnings when queued write timeouts and L2CAP
fragmentation are disabled, as the variables are then unused.
---
nimble/host/src/ble_hs_conn.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nimble/host/src/ble_hs_conn.c b/nimble/host/src/ble_hs_conn.c
index ba034a270..8d4343bf7 100644
--- a/nimble/host/src/ble_hs_conn.c
+++ b/nimble/host/src/ble_hs_conn.c
@@ -481,11 +481,14 @@ ble_hs_conn_timer(void)
#endif
struct ble_hs_conn *conn;
- ble_npl_time_t now = ble_npl_time_get();
int32_t next_exp_in = BLE_HS_FOREVER;
int32_t next_exp_in_new;
bool next_exp_in_updated;
+
+#if BLE_HS_ATT_SVR_QUEUED_WRITE_TMO || MYNEWT_VAL(BLE_L2CAP_RX_FRAG_TIMEOUT)
!= 0
+ ble_npl_time_t now = ble_npl_time_get();
int32_t time_diff;
+#endif
ble_hs_lock();