TT#111150 Fix function prototypes

Change-Id: I001d5079c9babf9b617cbe79a2714674ee5df6e1
Warned-by: gcc -Wstrict-prototypes
mr9.5.1
Guillem Jover 5 years ago
parent 807f53ac51
commit beab5f63b8

@ -23,7 +23,7 @@ MYSQL_CFLAGS := -I/usr/include/mysql
MYSQL_LDFLAGS := -lmysqlclient
endif
CFLAGS ?= -g -Wall -Wextra -O2
CFLAGS ?= -g -Wall -Wextra -Wstrict-prototypes -O2
CFLAGS += -D_GNU_SOURCE
CFLAGS += $(GLIB_CFLAGS)
CFLAGS += $(MYSQL_CFLAGS)

@ -51,6 +51,6 @@ extern int config_intermediate_interval;
extern med_loglevel_t config_loglevel;
int config_parse(int argc, char **argv);
void config_cleanup();
void config_cleanup(void);
#endif /* _CONFIG_H */

@ -3,7 +3,7 @@
#include "mediator.h"
int daemonize();
int daemonize(void);
int write_pid(const char *pidfile);
#endif /* _DAEMONIZER_H */

@ -33,7 +33,7 @@ GHashTable *med_call_stat_info_table = NULL;
GHashTable *med_cdr_tag_table = NULL;
/**********************************************************************/
static int mediator_load_maps()
static int mediator_load_maps(void)
{
med_peer_ip_table = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
med_peer_host_table = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
@ -60,7 +60,7 @@ static void mediator_print_mapentry(gpointer key, gpointer value, gpointer d __a
}
/**********************************************************************/
static void mediator_destroy_maps()
static void mediator_destroy_maps(void)
{
if(med_peer_ip_table)
g_hash_table_destroy(med_peer_ip_table);
@ -84,7 +84,7 @@ static void mediator_destroy_maps()
}
/**********************************************************************/
static void mediator_print_maps()
static void mediator_print_maps(void)
{
L_DEBUG("Peer IP map:");
g_hash_table_foreach(med_peer_ip_table, mediator_print_mapentry, NULL);
@ -99,7 +99,7 @@ static void mediator_print_maps()
}
/**********************************************************************/
static void mediator_unlock()
static void mediator_unlock(void)
{
L_DEBUG("Unlocking mediator.");
@ -110,7 +110,7 @@ static void mediator_unlock()
}
/**********************************************************************/
static void mediator_exit()
static void mediator_exit(void)
{
mediator_unlock();
config_cleanup();
@ -125,7 +125,7 @@ static void mediator_signal(int signal)
}
/**********************************************************************/
static int mediator_lock()
static int mediator_lock(void)
{
struct stat sb;

@ -88,7 +88,7 @@ static int medmysql_flush_int_cdr(struct medmysql_batches *);
static int medmysql_flush_all_med(struct medmysql_batches *);
static int medmysql_flush_med_str(struct medmysql_str *);
static int medmysql_flush_medlist(struct medmysql_str *);
static int medmysql_flush_call_stat_info();
static int medmysql_flush_call_stat_info(void);
static void medmysql_handler_close(medmysql_handler **h);
static int medmysql_handler_transaction(medmysql_handler *h);

@ -50,8 +50,8 @@ struct medmysql_call_stat_info_t {
uint64_t amount;
};
int medmysql_init();
void medmysql_cleanup();
int medmysql_init(void);
void medmysql_cleanup(void);
med_callid_t *medmysql_fetch_callids(uint64_t *count);
int medmysql_fetch_records(med_callid_t *callid, med_entry_t **entries, uint64_t *count, int warn_empty);
int medmysql_trash_entries(const char *callid, struct medmysql_batches *);
@ -61,7 +61,7 @@ int medmysql_insert_cdrs(cdr_entry_t *records, uint64_t count, struct medmysql_b
int medmysql_delete_intermediate(cdr_entry_t *records, uint64_t count, struct medmysql_batches *);
int medmysql_load_maps(GHashTable *ip_table, GHashTable *host_table, GHashTable *id_table);
int medmysql_load_uuids(GHashTable *uuid_table);
int medmysql_load_db_ids();
int medmysql_load_db_ids(void);
int medmysql_load_cdr_tag_ids(GHashTable *cdr_tag_table);
int medmysql_batch_start(struct medmysql_batches *);
int medmysql_batch_end(struct medmysql_batches *);

@ -6,8 +6,8 @@
#include "mediator.h"
#include "cdr.h"
int medredis_init();
void medredis_cleanup();
int medredis_init(void);
void medredis_cleanup(void);
med_callid_t *medredis_fetch_callids(uint64_t *count);
int medredis_fetch_records(med_callid_t *callid, med_entry_t **entries, uint64_t *count);
int medredis_trash_entries(med_entry_t *records, uint64_t count);

Loading…
Cancel
Save