fix warnings

This commit is contained in:
Matthias Ringwald 2019-10-04 10:10:56 +02:00
parent 73aea5d931
commit 6a5ffed8f9
3 changed files with 9 additions and 2 deletions

View File

@ -153,7 +153,10 @@ static void hci_emit_acl_packet(uint8_t * packet, uint16_t size);
static void hci_run(void);
static int hci_is_le_connection(hci_connection_t * connection);
static int hci_number_free_acl_slots_for_connection_type( bd_addr_type_t address_type);
#ifdef ENABLE_CLASSIC
static int hci_have_usb_transport(void);
#endif
#ifdef ENABLE_BLE
#ifdef ENABLE_LE_CENTRAL

View File

@ -140,7 +140,6 @@ static void l2cap_hci_event_handler(uint8_t packet_type, uint16_t channel, uint8
static void l2cap_acl_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size );
static void l2cap_notify_channel_can_send(void);
static void l2cap_emit_can_send_now(btstack_packet_handler_t packet_handler, uint16_t channel);
static uint16_t l2cap_next_local_cid(void);
static uint8_t l2cap_next_sig_id(void);
static l2cap_fixed_channel_t * l2cap_fixed_channel_for_channel_id(uint16_t local_cid);
#ifdef ENABLE_CLASSIC
@ -162,6 +161,8 @@ static void l2cap_le_finialize_channel_close(l2cap_channel_t *channel);
static inline l2cap_service_t * l2cap_le_get_service(uint16_t psm);
#endif
#ifdef L2CAP_USES_CHANNELS
static uint16_t l2cap_next_local_cid(void);
static l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid);
static void l2cap_emit_simple_event_with_cid(l2cap_channel_t * channel, uint8_t event_code);
static void l2cap_dispatch_to_channel(l2cap_channel_t *channel, uint8_t type, uint8_t * data, uint16_t size);
static l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid);
@ -196,8 +197,10 @@ static btstack_linked_list_t l2cap_le_services;
// single list of channels for Classic Channels, LE Data Channels, Classic Connectionless, ATT, and SM
static btstack_linked_list_t l2cap_channels;
#ifdef L2CAP_USES_CHANNELS
// next channel id for new connections
static uint16_t local_source_cid = 0x40;
#endif
// next signaling sequence number
static uint8_t sig_seq_nr = 0xff;
@ -828,6 +831,7 @@ static void l2cap_ertm_handle_in_sequence_sdu(l2cap_channel_t * l2cap_channel, l
#endif
#ifdef L2CAP_USES_CHANNELS
static uint16_t l2cap_next_local_cid(void){
do {
if (local_source_cid == 0xffff) {
@ -838,6 +842,7 @@ static uint16_t l2cap_next_local_cid(void){
} while (l2cap_get_channel_for_local_cid(local_source_cid) != NULL);
return local_source_cid;
}
#endif
static uint8_t l2cap_next_sig_id(void){
if (sig_seq_nr == 0xff) {

View File

@ -87,7 +87,6 @@ static hci_transport_config_uart_t config = {
static btstack_packet_callback_registration_t hci_event_callback_registration;
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
bd_addr_t addr;
if (packet_type != HCI_EVENT_PACKET) return;
switch (hci_event_packet_get_type(packet)){
case BTSTACK_EVENT_STATE: