Browse code

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

Marius Zbihlei authored on 04/04/2012 09:51:50
Showing 7 changed files
... ...
@@ -80,7 +80,7 @@ unsigned int set_fork_delay(unsigned int v)
80 80
 }
81 81
 
82 82
 /* number of known "common" used fds */
83
-static int calc_common_open_fds_no()
83
+static int calc_common_open_fds_no(void)
84 84
 {
85 85
 	int max_fds_no;
86 86
 	
... ...
@@ -128,7 +128,7 @@ int register_resolv_reinit_cb(on_resolv_reinit cb)
128 128
 /* counter init function
129 129
   must be called before fork
130 130
 */
131
-static int stat_init()
131
+static int stat_init(void)
132 132
 {
133 133
 	if (counter_register_array("dns", dns_cnt_defs) < 0)
134 134
 		goto error;
... ...
@@ -151,7 +151,7 @@ error:
151 151
  * will be used. See also resolv.conf(5).
152 152
  * returns: 0 on success, -1 on error
153 153
  */
154
-static int _resolv_init()
154
+static int _resolv_init(void)
155 155
 {
156 156
 	res_init();
157 157
 #ifdef HAVE_RESOLV_RES
... ...
@@ -173,7 +173,7 @@ static int _resolv_init()
173 173
 }
174 174
 
175 175
 /* wrapper function to initialize the resolver at startup */
176
-int resolv_init()
176
+int resolv_init(void)
177 177
 {
178 178
 	int res = -1;
179 179
 	_resolv_init();
... ...
@@ -52,7 +52,7 @@ static int rpc_sarray_max_size; /* number of entries alloc'ed */
52 52
 /** init the rpc hash table.
53 53
   * @return 0 on success, -1 on error
54 54
   */
55
-int init_rpcs()
55
+int init_rpcs(void)
56 56
 {
57 57
 	if (str_hash_alloc(&rpc_hash_table, RPC_HASH_SIZE)<0)
58 58
 		return -1;
... ...
@@ -65,7 +65,7 @@ int init_rpcs()
65 65
 
66 66
 
67 67
 
68
-void destroy_rpcs()
68
+void destroy_rpcs(void)
69 69
 {
70 70
 	int r;
71 71
 	struct str_hash_entry* e;
... ...
@@ -136,7 +136,7 @@ char* get_static_buffer(int req_size) {
136 136
  * Reset offset to unused space
137 137
  */
138 138
 
139
-int reset_static_buffer() {
139
+int reset_static_buffer(void) {
140 140
 	int i;
141 141
 
142 142
 	if (active_buffer == -1) {
... ...
@@ -1725,7 +1725,7 @@ error:
1725 1725
 
1726 1726
 #ifdef TCP_FD_CACHE
1727 1727
 
1728
-static void tcp_fd_cache_init()
1728
+static void tcp_fd_cache_init(void)
1729 1729
 {
1730 1730
 	int r;
1731 1731
 	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)
3174 3174
 
3175 3175
 
3176 3176
 
3177
-static int init_send_fd_queues()
3177
+static int init_send_fd_queues(void)
3178 3178
 {
3179 3179
 	if (send_fd_queue_init(&send2child_q, SEND_FD_QUEUE_SIZE)!=0)
3180 3180
 		goto error;
... ...
@@ -3186,7 +3186,7 @@ error:
3186 3186
 
3187 3187
 
3188 3188
 
3189
-static void destroy_send_fd_queues()
3189
+static void destroy_send_fd_queues(void)
3190 3190
 {
3191 3191
 	send_fd_queue_destroy(&send2child_q);
3192 3192
 }
... ...
@@ -4462,7 +4462,7 @@ static ticks_t tcpconn_main_timeout(ticks_t t, struct timer_ln* tl, void* data)
4462 4462
 
4463 4463
 
4464 4464
 
4465
-static inline void tcp_timer_run()
4465
+static inline void tcp_timer_run(void)
4466 4466
 {
4467 4467
 	ticks_t ticks;
4468 4468
 	
... ...
@@ -4480,7 +4480,7 @@ static inline void tcp_timer_run()
4480 4480
  * cleanup(). However it's also safe to call it from the tcp_main process.
4481 4481
  * => with the ser shutdown exception, it cannot execute in parallel
4482 4482
  * with tcpconn_add() or tcpconn_destroy()*/
4483
-static inline void tcpconn_destroy_all()
4483
+static inline void tcpconn_destroy_all(void)
4484 4484
 {
4485 4485
 	struct tcp_connection *c, *next;
4486 4486
 	unsigned h;
... ...
@@ -1509,7 +1509,7 @@ error:
1509 1509
 
1510 1510
 
1511 1511
 
1512
-inline static void tcp_reader_timer_run()
1512
+inline static void tcp_reader_timer_run(void)
1513 1513
 {
1514 1514
 	ticks_t ticks;
1515 1515
 	
... ...
@@ -411,7 +411,7 @@ void check_ser_drift();
411 411
  *        - it works ok as long as the adjustment interval < MAX_TICKS_T
412 412
  * -- andrei
413 413
  */
414
-inline static void adjust_ticks()
414
+inline static void adjust_ticks(void)
415 415
 {
416 416
 	struct timeval crt_time;
417 417
 	long long diff_time;
... ...
@@ -924,7 +924,7 @@ inline static void timer_list_expire(ticks_t t, struct timer_head* h
924 924
  * WARNING: it should never be called twice for the same *ticks value
925 925
  * (it could cause too fast expires for long timers), *ticks must be also
926 926
  *  always increasing */
927
-static void timer_handler()
927
+static void timer_handler(void)
928 928
 {
929 929
 	ticks_t saved_ticks;
930 930
 #ifdef USE_SLOW_TIMER