diff --git a/src/btstack_crypto.c b/src/btstack_crypto.c index 7d2da4160..85eba6685 100644 --- a/src/btstack_crypto.c +++ b/src/btstack_crypto.c @@ -107,7 +107,7 @@ typedef enum { static void btstack_crypto_run(void); -const static uint8_t zero[16] = { 0 }; +static const uint8_t zero[16] = { 0 }; static uint8_t btstack_crypto_initialized; static btstack_linked_list_t btstack_crypto_operations; diff --git a/src/classic/btstack_link_key_db_static.c b/src/classic/btstack_link_key_db_static.c index c7afc2068..fd72d3035 100644 --- a/src/classic/btstack_link_key_db_static.c +++ b/src/classic/btstack_link_key_db_static.c @@ -123,6 +123,7 @@ static int link_key_db_get_link_key(bd_addr_t bd_addr, link_key_t link_key, link } static void link_key_db_delete_link_key(bd_addr_t bd_addr){ + (void) bd_addr; } @@ -132,6 +133,7 @@ static void link_key_db_put_link_key(bd_addr_t bd_addr, link_key_t link_key, lin } static void link_key_db_set_local_bd_addr(bd_addr_t bd_addr){ + (void) bd_addr; } static int link_key_db_tlv_iterator_init(btstack_link_key_iterator_t * it){ @@ -142,7 +144,7 @@ static int link_key_db_tlv_iterator_init(btstack_link_key_iterator_t * it){ static int link_key_db_tlv_iterator_get_next(btstack_link_key_iterator_t * it, bd_addr_t bd_addr, link_key_t link_key, link_key_type_t * link_key_type){ uintptr_t i = (uintptr_t) it->context; - int num_entries = sizeof(link_key_db) / sizeof(link_key_entry_t); + unsigned int num_entries = sizeof(link_key_db) / sizeof(link_key_entry_t); if (i >= num_entries) return 0; // fetch values diff --git a/src/hci_transport_em9304_spi.c b/src/hci_transport_em9304_spi.c index fc923d164..aaea368c9 100644 --- a/src/hci_transport_em9304_spi.c +++ b/src/hci_transport_em9304_spi.c @@ -482,6 +482,7 @@ static void hci_transport_em9304_spi_block_sent(void){ } static int hci_transport_em9304_spi_can_send_now(uint8_t packet_type){ + UNUSED(packet_type); return tx_state == TX_IDLE; } @@ -499,6 +500,7 @@ static int hci_transport_em9304_spi_send_packet(uint8_t packet_type, uint8_t * p } static void hci_transport_em9304_spi_init(const void * transport_config){ + UNUSED(transport_config); } static int hci_transport_em9304_spi_open(void){ @@ -524,6 +526,9 @@ static void hci_transport_em9304_spi_register_packet_handler(void (*handler)(uin } static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){ + UNUSED(packet_type); + UNUSED(packet); + UNUSED(size); } // --- end of eHCILL implementation --------- diff --git a/src/hci_transport_h4.c b/src/hci_transport_h4.c index 1253ff644..2b3e32a4b 100644 --- a/src/hci_transport_h4.c +++ b/src/hci_transport_h4.c @@ -343,6 +343,7 @@ static void hci_transport_h4_block_sent(void){ } static int hci_transport_h4_can_send_now(uint8_t packet_type){ + UNUSED(packet_type); return tx_state == TX_IDLE; } @@ -442,6 +443,9 @@ static void hci_transport_h4_register_packet_handler(void (*handler)(uint8_t pac } static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){ + UNUSED(packet_type); + UNUSED(packet); + UNUSED(size); } // diff --git a/src/hci_transport_h5.c b/src/hci_transport_h5.c index 221dde9ff..9af6d54b2 100644 --- a/src/hci_transport_h5.c +++ b/src/hci_transport_h5.c @@ -197,6 +197,7 @@ static uint16_t crc16_calc_for_slip_frame(const uint8_t * header, const uint8_t // ----------------------------- static void hci_transport_inactivity_timeout_handler(btstack_timer_source_t * ts){ + UNUSED(ts); log_info("inactivity timeout. link state %d, peer asleep %u, actions 0x%02x, outgoing packet %u", link_state, link_peer_asleep, hci_transport_link_actions, hci_transport_link_have_outgoing_packet()); if (hci_transport_link_have_outgoing_packet()) return; @@ -440,7 +441,8 @@ static void hci_transport_link_set_timer(uint16_t timeout_ms){ btstack_run_loop_add_timer(&link_timer); } -static void hci_transport_link_timeout_handler(btstack_timer_source_t * timer){ +static void hci_transport_link_timeout_handler(btstack_timer_source_t * ts){ + UNUSED(ts); switch (link_state){ case LINK_UNINITIALIZED: hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC;