Module: sip-router Branch: master Commit: b264d2c6ec598ceee44a57659345d4033742f875 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b264d2c6...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@1and1.ro Date: Wed Apr 4 12:51:50 2012 +0300
master:core Continue cleaning erroneous definition of functions with no arguments
After testing with gcc 4.5.2, seems that not prototyping function cases extra assembler code regardles of optimization level
---
pt.c | 2 +- resolve.c | 6 +++--- rpc_lookup.c | 4 ++-- select_buf.c | 2 +- tcp_main.c | 10 +++++----- tcp_read.c | 2 +- timer.c | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/pt.c b/pt.c index 7764a94..46fc30c 100644 --- a/pt.c +++ b/pt.c @@ -80,7 +80,7 @@ unsigned int set_fork_delay(unsigned int v) }
/* number of known "common" used fds */ -static int calc_common_open_fds_no() +static int calc_common_open_fds_no(void) { int max_fds_no; diff --git a/resolve.c b/resolve.c index 782c15a..17772b7 100644 --- a/resolve.c +++ b/resolve.c @@ -128,7 +128,7 @@ int register_resolv_reinit_cb(on_resolv_reinit cb) /* counter init function must be called before fork */ -static int stat_init() +static int stat_init(void) { if (counter_register_array("dns", dns_cnt_defs) < 0) goto error; @@ -151,7 +151,7 @@ error: * will be used. See also resolv.conf(5). * returns: 0 on success, -1 on error */ -static int _resolv_init() +static int _resolv_init(void) { res_init(); #ifdef HAVE_RESOLV_RES @@ -173,7 +173,7 @@ static int _resolv_init() }
/* wrapper function to initialize the resolver at startup */ -int resolv_init() +int resolv_init(void) { int res = -1; _resolv_init(); diff --git a/rpc_lookup.c b/rpc_lookup.c index fdd1cfc..bbe551c 100644 --- a/rpc_lookup.c +++ b/rpc_lookup.c @@ -52,7 +52,7 @@ static int rpc_sarray_max_size; /* number of entries alloc'ed */ /** init the rpc hash table. * @return 0 on success, -1 on error */ -int init_rpcs() +int init_rpcs(void) { if (str_hash_alloc(&rpc_hash_table, RPC_HASH_SIZE)<0) return -1; @@ -65,7 +65,7 @@ int init_rpcs()
-void destroy_rpcs() +void destroy_rpcs(void) { int r; struct str_hash_entry* e; diff --git a/select_buf.c b/select_buf.c index 84c5feb..b3463a8 100644 --- a/select_buf.c +++ b/select_buf.c @@ -136,7 +136,7 @@ char* get_static_buffer(int req_size) { * Reset offset to unused space */
-int reset_static_buffer() { +int reset_static_buffer(void) { int i;
if (active_buffer == -1) { diff --git a/tcp_main.c b/tcp_main.c index b846862..1c6344c 100644 --- a/tcp_main.c +++ b/tcp_main.c @@ -1725,7 +1725,7 @@ error:
#ifdef TCP_FD_CACHE
-static void tcp_fd_cache_init() +static void tcp_fd_cache_init(void) { int r; for (r=0; r<TCP_FD_CACHE_SIZE; r++) @@ -3174,7 +3174,7 @@ static void send_fd_queue_destroy(struct tcp_send_fd_q *q)
-static int init_send_fd_queues() +static int init_send_fd_queues(void) { if (send_fd_queue_init(&send2child_q, SEND_FD_QUEUE_SIZE)!=0) goto error; @@ -3186,7 +3186,7 @@ error:
-static void destroy_send_fd_queues() +static void destroy_send_fd_queues(void) { send_fd_queue_destroy(&send2child_q); } @@ -4462,7 +4462,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* tl, void* data)
-static inline void tcp_timer_run() +static inline void tcp_timer_run(void) { ticks_t ticks; @@ -4480,7 +4480,7 @@ static inline void tcp_timer_run() * cleanup(). However it's also safe to call it from the tcp_main process. * => with the ser shutdown exception, it cannot execute in parallel * with tcpconn_add() or tcpconn_destroy()*/ -static inline void tcpconn_destroy_all() +static inline void tcpconn_destroy_all(void) { struct tcp_connection *c, *next; unsigned h; diff --git a/tcp_read.c b/tcp_read.c index 05e4d44..f73a239 100644 --- a/tcp_read.c +++ b/tcp_read.c @@ -1509,7 +1509,7 @@ error:
-inline static void tcp_reader_timer_run() +inline static void tcp_reader_timer_run(void) { ticks_t ticks; diff --git a/timer.c b/timer.c index 205efa6..a735197 100644 --- a/timer.c +++ b/timer.c @@ -411,7 +411,7 @@ void check_ser_drift(); * - it works ok as long as the adjustment interval < MAX_TICKS_T * -- andrei */ -inline static void adjust_ticks() +inline static void adjust_ticks(void) { struct timeval crt_time; long long diff_time; @@ -924,7 +924,7 @@ inline static void timer_list_expire(ticks_t t, struct timer_head* h * WARNING: it should never be called twice for the same *ticks value * (it could cause too fast expires for long timers), *ticks must be also * always increasing */ -static void timer_handler() +static void timer_handler(void) { ticks_t saved_ticks; #ifdef USE_SLOW_TIMER