diff --git a/ble/att.h b/ble/att.h index d22ba4cf0..6c22c9135 100644 --- a/ble/att.h +++ b/ble/att.h @@ -246,7 +246,7 @@ uint16_t att_prepare_handle_value_indication(att_connection_t * att_connection, /* * @brief transcation queue of prepared writes, e.g., after disconnect */ -void att_clear_transaction_queue(); +void att_clear_transaction_queue(att_connection_t * att_connection); // experimental client API uint16_t att_uuid_for_handle(uint16_t handle); diff --git a/ble/att_server.h b/ble/att_server.h index 6b83fd104..df51fe11d 100644 --- a/ble/att_server.h +++ b/ble/att_server.h @@ -63,7 +63,7 @@ void att_server_register_packet_handler(btstack_packet_handler_t handler); * @brief tests if a notification or indication can be send right now * @return 1, if packet can be sent */ -int att_server_can_send(); +int att_server_can_send(void); /* * @brief notify client about attribute value change diff --git a/ble/gatt_client.h b/ble/gatt_client.h index 972bf90b2..1878ac86d 100644 --- a/ble/gatt_client.h +++ b/ble/gatt_client.h @@ -237,7 +237,7 @@ typedef struct le_characteristic_descriptor_event{ /** * @brief Set up GATT client. */ -void gatt_client_init(); +void gatt_client_init(void); /** * @brief Register callback (packet handler) for GATT client. Returns GATT client ID. diff --git a/ble/le_device_db.h b/ble/le_device_db.h index fb3609720..1d3676024 100644 --- a/ble/le_device_db.h +++ b/ble/le_device_db.h @@ -64,7 +64,7 @@ extern "C" { /** * @brief init */ -void le_device_db_init(); +void le_device_db_init(void); /** * @brief add device to db diff --git a/ble/sm.c b/ble/sm.c index db5d34f17..73b1f5802 100644 --- a/ble/sm.c +++ b/ble/sm.c @@ -246,12 +246,12 @@ static const stk_generation_method_t stk_generation_method[5][5] = { { PK_RESP_INPUT, PK_RESP_INPUT, PK_INIT_INPUT, JUST_WORKS, PK_RESP_INPUT }, }; -static void sm_run(); +static void sm_run(void); static void sm_done_for_handle(uint16_t handle); static void sm_notify_client(uint8_t type, uint8_t addr_type, bd_addr_t address, uint32_t passkey, uint16_t index); static sm_connection_t * sm_get_connection_for_handle(uint16_t handle); static inline int sm_calc_actual_encryption_key_size(int other); -static int sm_validate_stk_generation_method(); +static int sm_validate_stk_generation_method(void); static void log_info_hex16(const char * name, uint16_t value){ log_info("%-6s 0x%04x", name, value); @@ -2064,7 +2064,7 @@ static sm_connection_t * sm_get_connection_for_handle(uint16_t con_handle){ } static sm_connection_t * sm_get_connection(uint8_t addr_type, bd_addr_t address){ - hci_connection_t * hci_con = hci_connection_for_bd_addr_and_type(address, addr_type); + hci_connection_t * hci_con = hci_connection_for_bd_addr_and_type(address, (bd_addr_type_t)addr_type); if (!hci_con) return NULL; return &hci_con->sm_connection; } diff --git a/ble/sm.h b/ble/sm.h index 3c6a2c158..e0ec5b0a3 100644 --- a/ble/sm.h +++ b/ble/sm.h @@ -127,7 +127,7 @@ typedef struct sm_event { /** * @brief Initializes the Security Manager, connects to L2CAP */ -void sm_init(); +void sm_init(void); /** * @brief Set secret ER key for key generation as described in Core V4.0, Vol 3, Part G, 5.2.2 @@ -253,7 +253,7 @@ void sm_authorization_grant(uint8_t addr_type, bd_addr_t address); * @brief Support for signed writes, used by att_server. * @note Message and result are in little endian to allows passing in ATT PDU without flipping them first. */ -int sm_cmac_ready(); +int sm_cmac_ready(void); void sm_cmac_start(sm_key_t k, uint16_t message_len, uint8_t * message, uint32_t sign_counter, void (*done_handler)(uint8_t hash[8])); /** diff --git a/src/hci.c b/src/hci.c index cb77df02b..27f80f56f 100644 --- a/src/hci.c +++ b/src/hci.c @@ -79,7 +79,7 @@ static void hci_connection_timeout_handler(timer_source_t *timer); static void hci_connection_timestamp(hci_connection_t *connection); static int hci_power_control_on(void); static void hci_power_control_off(void); -static void hci_state_reset(); +static void hci_state_reset(void); // the STACK is here #ifndef HAVE_MALLOC @@ -1476,7 +1476,7 @@ static void event_handler(uint8_t *packet, int size){ case HCI_EVENT_DISCONNECTION_COMPLETE: if (packet[2]) break; // status != 0 handle = READ_BT_16(packet, 3); - hci_connection_t * conn = hci_connection_for_handle(handle); + conn = hci_connection_for_handle(handle); if (!conn) break; // no conn struct anymore conn->state = RECEIVED_DISCONNECTION_COMPLETE; break; diff --git a/src/sdp_client.c b/src/sdp_client.c index 4b63a2c81..ccf6ff197 100644 --- a/src/sdp_client.c +++ b/src/sdp_client.c @@ -194,7 +194,7 @@ void sdp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, return; } - PDU_ID = packet[0]; + PDU_ID = (SDP_PDU_ID_t)packet[0]; log_info("SDP Client :: PDU ID. %u ,%u", PDU_ID, packet[0]); switch (PDU_ID){ #ifdef HAVE_SDP_EXTRA_QUERIES diff --git a/src/sdp_query_rfcomm.h b/src/sdp_query_rfcomm.h index cbe4a2ee6..688249830 100644 --- a/src/sdp_query_rfcomm.h +++ b/src/sdp_query_rfcomm.h @@ -68,7 +68,7 @@ typedef struct sdp_query_rfcomm_service_event { */ void sdp_query_rfcomm_register_callback(void(*sdp_app_callback)(sdp_query_event_t * event, void * context), void * context); -void sdp_query_rfcomm_deregister_callback(); +void sdp_query_rfcomm_deregister_callback(void); /** * @brief Searches SDP records on a remote device for RFCOMM services with a given UUID.