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.
This commit is contained in:
Oleksandr Nychyporuk
2026-01-26 11:38:01 +01:00
committed by Szymon Janc
parent ef2963ecd4
commit b7674a1d9e
+4 -1
View File
@@ -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();