fix prototypes for fn()

This commit is contained in:
Matthias Ringwald 2016-03-28 11:44:30 +02:00
parent e3f52beb49
commit 0cb5b9716d
15 changed files with 50 additions and 50 deletions

View File

@ -413,7 +413,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance() {
const hci_transport_t * hci_transport_h4_instance(void) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -672,7 +672,7 @@ static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_sou
}
// get h5 singleton
const hci_transport_t * hci_transport_h5_instance() {
const hci_transport_t * hci_transport_h5_instance(void) {
if (hci_transport_h5 == NULL) {
hci_transport_h5 = (hci_transport_t*) malloc(sizeof(hci_transport_t));
memset(hci_transport_h5, 0, sizeof(hci_transport_t));

View File

@ -247,7 +247,7 @@ err_out0:
return -1;
}
static int h4_close(){
static int h4_close(void){
// first remove run loop handler
btstack_run_loop_remove_data_source(hci_transport_h4->ds);
@ -389,7 +389,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance() {
const hci_transport_t * hci_transport_h4_instance(void) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -1024,7 +1024,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get usb singleton
const hci_transport_t * hci_transport_usb_instance() {
const hci_transport_t * hci_transport_usb_instance(void) {
if (!hci_transport_usb) {
hci_transport_usb = (hci_transport_t*) malloc( sizeof(hci_transport_t));
memset(hci_transport_usb, 0, sizeof(hci_transport_t));

View File

@ -80,7 +80,7 @@ void uart_error_handle(app_uart_evt_t * p_event)
}
}
static void init_timer() {
static void init_timer(void) {
#if 1
// start high frequency clock source if not done yet

View File

@ -330,7 +330,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance() {
const hci_transport_t * hci_transport_h4_instance(void) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -225,7 +225,7 @@ static void hfp_emit_audio_connection_established_event(hfp_callback_t callback,
(*callback)(event, sizeof(event));
}
btstack_linked_list_t * hfp_get_connections(){
btstack_linked_list_t * hfp_get_connections(void){
return (btstack_linked_list_t *) &hfp_connections;
}

View File

@ -156,7 +156,7 @@ void hfp_ag_register_packet_handler(hfp_callback_t callback){
hfp_set_callback(callback);
}
static int use_in_band_tone(){
static int use_in_band_tone(void){
return get_bit(hfp_supported_features, HFP_AGSF_IN_BAND_RING_TONE);
}
@ -1022,7 +1022,7 @@ static void hfp_ag_trigger_terminate_call(void){
hfp_emit_simple_event(hfp_callback, HFP_SUBEVENT_CALL_TERMINATED);
}
static void hfp_ag_set_callsetup_indicator(){
static void hfp_ag_set_callsetup_indicator(void){
hfp_ag_indicator_t * indicator = get_ag_indicator_for_name("callsetup");
if (!indicator){
log_error("hfp_ag_set_callsetup_indicator: callsetup indicator is missing");
@ -1030,7 +1030,7 @@ static void hfp_ag_set_callsetup_indicator(){
indicator->status = hfp_gsm_callsetup_status();
}
static void hfp_ag_set_callheld_indicator(){
static void hfp_ag_set_callheld_indicator(void){
hfp_ag_indicator_t * indicator = get_ag_indicator_for_name("callheld");
if (!indicator){
log_error("hfp_ag_set_callheld_state: callheld indicator is missing");
@ -1038,7 +1038,7 @@ static void hfp_ag_set_callheld_indicator(){
indicator->status = hfp_gsm_callheld_status();
}
static void hfp_ag_set_call_indicator(){
static void hfp_ag_set_call_indicator(void){
hfp_ag_indicator_t * indicator = get_ag_indicator_for_name("call");
if (!indicator){
log_error("hfp_ag_set_call_state: call indicator is missing");

View File

@ -1056,7 +1056,7 @@ static void hfp_handle_rfcomm_event(uint8_t packet_type, uint16_t channel, uint8
hfp_run_for_context(hfp_connection);
}
static void hfp_run(){
static void hfp_run(void){
btstack_linked_list_iterator_t it;
btstack_linked_list_iterator_init(&it, hfp_get_connections());
while (btstack_linked_list_iterator_has_next(&it)){

View File

@ -3548,7 +3548,7 @@ void hci_set_sco_voice_setting(uint16_t voice_setting){
* @brief Get SCO Voice Setting
* @return current voice setting
*/
uint16_t hci_get_sco_voice_setting(){
uint16_t hci_get_sco_voice_setting(void){
return hci_stack->sco_voice_setting;
}

View File

@ -84,7 +84,7 @@ uint16_t l2cap_max_le_mtu(void){
return max_mtu;
}
void l2cap_init(){}
void l2cap_init(void){}
void l2cap_register_fixed_channel(btstack_packet_handler_t packet_handler, uint16_t channel_id) {
att_packet_handler = packet_handler;

View File

@ -110,11 +110,11 @@ static hfp_generic_status_indicator_t hf_indicators[] = {
static uint16_t handle = -1;
static int memory_1_enabled = 1;
int has_more_hfp_ag_commands(){
int has_more_hfp_ag_commands(void){
return has_more_hfp_commands(2,2);
}
char * get_next_hfp_ag_command(){
char * get_next_hfp_ag_command(void){
return get_next_hfp_command(2,2);
}

View File

@ -83,11 +83,11 @@ static int supported_features_with_codec_negotiation = 438;
static uint16_t handle = -1;
char * get_next_hfp_hf_command(){
char * get_next_hfp_hf_command(void){
return get_next_hfp_command(0,2);
}
int has_more_hfp_hf_commands(){
int has_more_hfp_hf_commands(void){
return has_more_hfp_commands(0,2);
}

View File

@ -72,11 +72,11 @@ hfp_connection_t * hfp_context;
void (*registered_rfcomm_packet_handler)(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
void (*registered_sdp_app_callback)(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
uint8_t * get_rfcomm_payload(){
uint8_t * get_rfcomm_payload(void){
return &rfcomm_payload[0];
}
uint16_t get_rfcomm_payload_len(){
uint16_t get_rfcomm_payload_len(void){
return rfcomm_payload_len;
}
@ -169,7 +169,7 @@ int rfcomm_send_prepared(uint16_t rfcomm_cid, uint16_t len){
return rfcomm_send(rfcomm_cid, rfcomm_reserved_buffer, len);
}
static void hci_event_sco_complete(){
static void hci_event_sco_complete(void){
uint8_t event[19];
uint8_t pos = 0;
event[pos++] = HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE;
@ -306,7 +306,7 @@ uint8_t gap_disconnect(hci_con_handle_t handle){
return 0;
}
uint16_t hci_get_sco_voice_setting(){
uint16_t hci_get_sco_voice_setting(void){
return 0x40;
}

View File

@ -4126,47 +4126,47 @@ hfp_test_item_t pts_hf_rhh_tests[] = {
static int test_item_size = sizeof(hfp_test_item_t);
// CC
int hfp_cc_tests_size(){ return sizeof(cc_tests) /test_item_size;}
hfp_test_item_t * hfp_cc_tests(){ return cc_tests;}
hfp_test_item_t * default_hfp_cc_test(){ return &cc_tests[0];}
int hfp_cc_tests_size(void){ return sizeof(cc_tests) /test_item_size;}
hfp_test_item_t * hfp_cc_tests(void){ return cc_tests;}
hfp_test_item_t * default_hfp_cc_test(void){ return &cc_tests[0];}
// PTS - SLC Group
int hfp_pts_ag_slc_tests_size(){ return sizeof(pts_ag_slc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_slc_tests(){ return pts_ag_slc_tests;}
int hfp_pts_ag_slc_tests_size(void){ return sizeof(pts_ag_slc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_slc_tests(void){ return pts_ag_slc_tests;}
int hfp_pts_hf_slc_tests_size(){ return sizeof(pts_hf_slc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_slc_tests(){ return pts_hf_slc_tests;}
int hfp_pts_hf_slc_tests_size(void){ return sizeof(pts_hf_slc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_slc_tests(void){ return pts_hf_slc_tests;}
// PTS - ATA Group
int hfp_pts_ag_ata_tests_size(){ return sizeof(pts_ag_ata_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ata_tests(){ return pts_ag_ata_tests;}
int hfp_pts_ag_ata_tests_size(void){ return sizeof(pts_ag_ata_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ata_tests(void){ return pts_ag_ata_tests;}
int hfp_pts_hf_ata_tests_size(){ return sizeof(pts_hf_ata_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ata_tests(){ return pts_hf_ata_tests;}
int hfp_pts_hf_ata_tests_size(void){ return sizeof(pts_hf_ata_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ata_tests(void){ return pts_hf_ata_tests;}
// PTS - TWC Group
int hfp_pts_ag_twc_tests_size(){ return sizeof(pts_ag_twc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_twc_tests(){ return pts_ag_twc_tests;}
int hfp_pts_hf_twc_tests_size(){ return sizeof(pts_hf_twc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_twc_tests(){ return pts_hf_twc_tests;}
int hfp_pts_ag_twc_tests_size(void){ return sizeof(pts_ag_twc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_twc_tests(void){ return pts_ag_twc_tests;}
int hfp_pts_hf_twc_tests_size(void){ return sizeof(pts_hf_twc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_twc_tests(void){ return pts_hf_twc_tests;}
// PTS - ECS Group
int hfp_pts_ag_ecs_tests_size(){ return sizeof(pts_ag_ecs_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ecs_tests(){ return pts_ag_ecs_tests;}
int hfp_pts_hf_ecs_tests_size(){ return sizeof(pts_hf_ecs_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ecs_tests(){ return pts_hf_ecs_tests;}
int hfp_pts_ag_ecs_tests_size(void){ return sizeof(pts_ag_ecs_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ecs_tests(void){ return pts_ag_ecs_tests;}
int hfp_pts_hf_ecs_tests_size(void){ return sizeof(pts_hf_ecs_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ecs_tests(void){ return pts_hf_ecs_tests;}
// PTS - ECC Group
int hfp_pts_ag_ecc_tests_size(){ return sizeof(pts_ag_ecc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ecc_tests(){ return pts_ag_ecc_tests;}
int hfp_pts_hf_ecc_tests_size(){ return sizeof(pts_hf_ecc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ecc_tests(){ return pts_hf_ecc_tests;}
int hfp_pts_ag_ecc_tests_size(void){ return sizeof(pts_ag_ecc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_ecc_tests(void){ return pts_ag_ecc_tests;}
int hfp_pts_hf_ecc_tests_size(void){ return sizeof(pts_hf_ecc_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_ecc_tests(void){ return pts_hf_ecc_tests;}
// PTS - RHH Group
int hfp_pts_ag_rhh_tests_size(){ return sizeof(pts_ag_rhh_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_rhh_tests(){ return pts_ag_rhh_tests;}
int hfp_pts_hf_rhh_tests_size(){ return sizeof(pts_hf_rhh_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_rhh_tests(){ return pts_hf_rhh_tests;}
int hfp_pts_ag_rhh_tests_size(void){ return sizeof(pts_ag_rhh_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_ag_rhh_tests(void){ return pts_ag_rhh_tests;}
int hfp_pts_hf_rhh_tests_size(void){ return sizeof(pts_hf_rhh_tests)/test_item_size;}
hfp_test_item_t * hfp_pts_hf_rhh_tests(void){ return pts_hf_rhh_tests;}