Merge pull request #3 from swilson/master

Fix C99 warnings.
This commit is contained in:
Matthias Ringwald 2015-05-02 18:55:54 +02:00
commit 0d60e59da1
9 changed files with 13 additions and 13 deletions

View File

@ -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);

View File

@ -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

View File

@ -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.

View File

@ -64,7 +64,7 @@ extern "C" {
/**
* @brief init
*/
void le_device_db_init();
void le_device_db_init(void);
/**
* @brief add device to db

View File

@ -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;
}

View File

@ -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]));
/**

View File

@ -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;

View File

@ -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

View File

@ -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.