diff --git a/src/ble/sm.c b/src/ble/sm.c index 4b03dcaeb..a80388d1d 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -3006,6 +3006,7 @@ static bool sm_ctkd_from_le(sm_connection_t *sm_connection) { // get started (all of the above are true) return true; #else + UNUSED(sm_connection); return false; #endif } diff --git a/src/hci.c b/src/hci.c index 12fdc15c2..1c819075c 100644 --- a/src/hci.c +++ b/src/hci.c @@ -2243,7 +2243,6 @@ static void event_handler(uint8_t *packet, uint16_t size){ return; } - bd_addr_t addr; bd_addr_type_t addr_type; hci_con_handle_t handle; hci_connection_t * conn; @@ -2252,6 +2251,7 @@ static void event_handler(uint8_t *packet, uint16_t size){ #ifdef ENABLE_CLASSIC uint8_t link_type; + bd_addr_t addr; #endif // log_info("HCI:EVENT:%02x", hci_event_packet_get_type(packet)); @@ -5967,8 +5967,10 @@ bool gap_bonded(hci_con_handle_t con_handle){ hci_connection_t * hci_connection = hci_connection_for_handle(con_handle); if (hci_connection == NULL) return 0; +#ifdef ENABLE_CLASSIC link_key_t link_key; link_key_type_t link_key_type; +#endif switch (hci_connection->address_type){ case BD_ADDR_TYPE_LE_PUBLIC: case BD_ADDR_TYPE_LE_RANDOM: diff --git a/src/l2cap.c b/src/l2cap.c index 0c86cc00e..032d783fd 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -3986,6 +3986,7 @@ static gap_security_level_t l2cap_le_security_level_for_connection(hci_con_handl static void l2cap_sm_packet_handler(uint8_t packet_type, uint16_t channel_nr, uint8_t *packet, uint16_t size) { UNUSED(channel_nr); UNUSED(size); + UNUSED(packet_type); btstack_assert(packet_type = HCI_EVENT_PACKET); if (hci_event_packet_get_type(packet) != SM_EVENT_PAIRING_COMPLETE) return; hci_con_handle_t con_handle = sm_event_pairing_complete_get_handle(packet);