From 05002aec5b20c724b057c3b182f3a10169f47e9a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 18 Aug 2020 14:40:22 +0200 Subject: [PATCH] hci, mesh_lower_transport: fix warnings --- src/hci.c | 2 +- src/mesh/mesh_lower_transport.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hci.c b/src/hci.c index 9201d4eb1..a32ec7ec9 100644 --- a/src/hci.c +++ b/src/hci.c @@ -4389,7 +4389,7 @@ int hci_send_cmd_packet(uint8_t *packet, int size){ break; } // track outgoing connection - hci_stack->outgoing_addr_type = packet[8]; // peer addres type + hci_stack->outgoing_addr_type = (bd_addr_type_t) packet[8]; // peer addres type reverse_bd_addr( &packet[9], hci_stack->outgoing_addr); // peer address break; case HCI_OPCODE_HCI_LE_CREATE_CONNECTION_CANCEL: diff --git a/src/mesh/mesh_lower_transport.c b/src/mesh/mesh_lower_transport.c index 67ee19da1..e5a400133 100644 --- a/src/mesh/mesh_lower_transport.c +++ b/src/mesh/mesh_lower_transport.c @@ -939,13 +939,11 @@ static void mesh_lower_transport_run(void){ } void mesh_lower_transport_send_pdu(mesh_pdu_t *pdu){ - mesh_network_pdu_t * network_pdu; mesh_segmented_pdu_t * segmented_pdu; switch (pdu->pdu_type){ case MESH_PDU_TYPE_UPPER_UNSEGMENTED_ACCESS: case MESH_PDU_TYPE_UPPER_UNSEGMENTED_CONTROL: - network_pdu = (mesh_network_pdu_t *) pdu; - btstack_assert(network_pdu->len >= 9); + btstack_assert(((mesh_network_pdu_t *) pdu)->len >= 9); break; case MESH_PDU_TYPE_SEGMENTED: // set num retries, set of segments to send