fix -Wstrict-prototypes

This commit is contained in:
matthias.ringwald 2011-06-06 13:57:15 +00:00
parent 4130a444b8
commit 694159226e
15 changed files with 42 additions and 43 deletions

View File

@ -64,10 +64,10 @@ typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel,
void bt_use_tcp(const char * address, uint16_t port);
// init BTstack library
int bt_open();
int bt_open(void);
// stop using BTstack library
int bt_close();
int bt_close(void);
// send hci cmd packet
int bt_send_cmd(const hci_cmd_t *cmd, ...);

View File

@ -55,7 +55,7 @@ void linked_list_add(linked_list_t * list, linked_item_t *item); // <-- a
void linked_list_add_tail(linked_list_t * list, linked_item_t *item); // <-- add item to list as last element
int linked_list_remove(linked_list_t * list, linked_item_t *item); // <-- remove item from list
void test_linked_list();
void test_linked_list(void);
#if defined __cplusplus
}

View File

@ -86,7 +86,7 @@ int run_loop_remove_data_source(data_source_t *dataSource);
// execute configured run_loop
void run_loop_execute();
void run_loop_execute(void);
#if defined __cplusplus
}

View File

@ -251,7 +251,7 @@ uint16_t hci_create_cmd_internal(uint8_t *hci_cmd_buffer, const hci_cmd_t *cmd,
// set up HCI
void hci_init(hci_transport_t *transport, void *config, bt_control_t *control, remote_device_db_t * remote_device_db);
void hci_register_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size));
void hci_close();
void hci_close(void);
// power and inquriy scan control
int hci_power_control(HCI_POWER_MODE mode);
@ -260,7 +260,7 @@ void hci_discoverable_control(uint8_t enable);
/**
* run the hci control loop once
*/
void hci_run();
void hci_run(void);
// create and send hci command packets based on a template and a list of parameters
int hci_send_cmd(const hci_cmd_t *cmd, ...);
@ -273,20 +273,20 @@ int hci_send_acl_packet(uint8_t *packet, int size);
hci_connection_t * connection_for_handle(hci_con_handle_t con_handle);
uint8_t hci_number_outgoing_packets(hci_con_handle_t handle);
uint8_t hci_number_free_acl_slots();
uint8_t hci_number_free_acl_slots(void);
int hci_ready_to_send(hci_con_handle_t handle);
int hci_authentication_active_for_handle(hci_con_handle_t handle);
void hci_drop_link_key_for_bd_addr(bd_addr_t *addr);
uint16_t hci_max_acl_data_packet_length();
uint16_t hci_max_acl_data_packet_length(void);
//
void hci_emit_state();
void hci_emit_state(void);
void hci_emit_connection_complete(hci_connection_t *conn);
void hci_emit_l2cap_check_timeout(hci_connection_t *conn);
void hci_emit_disconnection_complete(uint16_t handle, uint8_t reason);
void hci_emit_nr_connections_changed();
void hci_emit_hci_open_failed();
void hci_emit_btstack_version();
void hci_emit_nr_connections_changed(void);
void hci_emit_hci_open_failed(void);
void hci_emit_btstack_version(void);
void hci_emit_system_bluetooth_enabled(uint8_t enabled);
void hci_emit_remote_name_cached(bd_addr_t *addr, device_name_t *name);
void hci_emit_discoverable_enabled(uint8_t enabled);

View File

@ -49,10 +49,10 @@ extern "C" {
/* HCI packet types */
typedef struct {
int (*open)(void *transport_config);
int (*close)();
int (*close)(void *transport_config);
int (*send_packet)(uint8_t packet_type, uint8_t *packet, int size);
void (*register_packet_handler)(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size));
const char * (*get_transport_name)();
const char * (*get_transport_name)(void);
// custom extension for UART transport implementations
int (*set_baudrate)(uint32_t baudrate);
} hci_transport_t;
@ -72,9 +72,10 @@ typedef struct {
#endif
// inline various hci_transport_X.h files
extern hci_transport_t * hci_transport_h4_instance();
extern hci_transport_t * hci_transport_h5_instance();
extern hci_transport_t * hci_transport_usb_instance();
extern hci_transport_t * hci_transport_h4_instance(void);
extern hci_transport_t * hci_transport_h4_dma_instance(void);
extern hci_transport_t * hci_transport_h5_instance(void);
extern hci_transport_t * hci_transport_usb_instance(void);
#if defined __cplusplus
}

View File

@ -114,7 +114,7 @@ typedef struct {
} l2cap_service_t;
void l2cap_init();
void l2cap_init(void);
void l2cap_register_packet_handler(void (*handler)(void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size));
void l2cap_create_channel_internal(void * connection, btstack_packet_handler_t packet_handler, bd_addr_t address, uint16_t psm, uint16_t mtu);
void l2cap_disconnect_internal(uint16_t local_cid, uint8_t reason);

View File

@ -57,6 +57,6 @@ typedef enum {
} L2CAP_SIGNALING_COMMANDS;
uint16_t l2cap_create_signaling_internal(uint8_t * acl_buffer,hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, uint8_t identifier, va_list argptr);
uint8_t l2cap_next_sig_id();
uint16_t l2cap_next_local_cid();
uint8_t l2cap_next_sig_id(void);
uint16_t l2cap_next_local_cid(void);

View File

@ -40,8 +40,8 @@
typedef struct {
// management
void (*open)();
void (*close)();
void (*open)(void);
void (*close)(void);
// link key
int (*get_link_key)(bd_addr_t *bd_addr, link_key_t *link_key);

View File

@ -58,7 +58,7 @@ extern run_loop_t run_loop_cocoa;
#endif
// assert run loop initialized
void run_loop_assert(){
void run_loop_assert(void){
#ifndef EMBEDDED
if (!the_run_loop){
log_err("ERROR: run_loop function called before run_loop_init!\n");

View File

@ -132,15 +132,15 @@ int cocoa_remove_timer(timer_source_t * ts){
return 0;
}
void cocoa_init(){
void cocoa_init(void){
}
void cocoa_execute()
void cocoa_execute(void)
{
CFRunLoopRun();
}
void cocoa_dump_timer(){
void cocoa_dump_timer(void){
fprintf(stderr, "WARNING: run_loop_dump_timer not implemented yet!");
return;
}

View File

@ -96,7 +96,7 @@ int embedded_remove_timer(timer_source_t *ts){
#endif
}
void embedded_dump_timer(){
void embedded_dump_timer(void){
#ifndef EMBEDDED
linked_item_t *it;
int i = 0;
@ -110,13 +110,11 @@ void embedded_dump_timer(){
/**
* Execute run_loop
*/
void embedded_execute() {
void embedded_execute(void) {
data_source_t *ds;
#ifdef HAVE_TIME
timer_source_t *ts;
struct timeval current_tv;
struct timeval next_tv;
struct timeval *timeout;
#endif
while (1) {
@ -144,7 +142,7 @@ void embedded_execute() {
}
}
void embedded_init(){
void embedded_init(void){
data_sources = NULL;
timers = NULL;
}

View File

@ -45,7 +45,7 @@
#include <stdlib.h>
#include <stdio.h>
void posix_dump_timer();
void posix_dump_timer(void);
// the run loop
static linked_list_t data_sources;
@ -99,7 +99,7 @@ int posix_remove_timer(timer_source_t *ts){
return linked_list_remove(&timers, (linked_item_t *) ts);
}
void posix_dump_timer(){
void posix_dump_timer(void){
linked_item_t *it;
int i = 0;
for (it = (linked_item_t *) timers; it ; it = it->next){
@ -111,7 +111,7 @@ void posix_dump_timer(){
/**
* Execute run_loop
*/
void posix_execute() {
void posix_execute(void) {
fd_set descriptors;
data_source_t *ds;
timer_source_t *ts;
@ -184,7 +184,7 @@ void posix_execute() {
}
}
void posix_init(){
void posix_init(void){
data_sources = NULL;
timers = NULL;
}

View File

@ -49,15 +49,15 @@ int run_loop_timer_compare(timer_source_t *a, timer_source_t *b);
#endif
//
void run_loop_timer_dump();
void run_loop_timer_dump(void);
// internal use only
typedef struct {
void (*init)();
void (*init)(void);
void (*add_data_source)(data_source_t *dataSource);
int (*remove_data_source)(data_source_t *dataSource);
void (*add_timer)(timer_source_t *timer);
int (*remove_timer)(timer_source_t *timer);
void (*execute)();
void (*dump_timer)();
void (*execute)(void);
void (*dump_timer)(void);
} run_loop_t;

View File

@ -172,7 +172,7 @@ void static socket_connection_emit_connection_closed(connection_t *connection){
(*socket_connection_packet_callback)(connection, DAEMON_EVENT_PACKET, 0, (uint8_t *) &event, 1);
}
void static socket_connection_emit_nr_connections(){
void static socket_connection_emit_nr_connections(void){
linked_item_t *it;
uint8_t nr_connections = 0;
for (it = (linked_item_t *) connections; it != NULL ; it = it->next, nr_connections++);

View File

@ -48,7 +48,7 @@ typedef struct connection connection_t;
/**
* create socket data_source for socket specified by launchd configuration
*/
int socket_connection_create_launchd();
int socket_connection_create_launchd(void);
/**
* create socket for incoming tcp connections
@ -78,7 +78,7 @@ int socket_connection_close_tcp(connection_t *connection);
/**
* create unix socket connection to BTdaemon
*/
connection_t * socket_connection_open_unix();
connection_t * socket_connection_open_unix(void);
/**
* close unix connection to BTdaemon
@ -105,4 +105,4 @@ void socket_connection_send_packet_all(uint16_t type, uint16_t channel, uint8_t
* try to dispatch packet for all "parked" connections.
* if dispatch is successful, a connection is added again to run loop
*/
void socket_connection_retry_parked();
void socket_connection_retry_parked(void);