Skip to content

Commit 03862ed

Browse files
committed
FPM fix strict prototype warnings
1 parent 332ac8e commit 03862ed

22 files changed

+61
-117
lines changed

sapi/fpm/fpm/events/devpoll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <errno.h>
3030

3131
static int fpm_event_devpoll_init(int max);
32-
static int fpm_event_devpoll_clean();
32+
static int fpm_event_devpoll_clean(void);
3333
static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3434
static int fpm_event_devpoll_add(struct fpm_event_s *ev);
3535
static int fpm_event_devpoll_remove(struct fpm_event_s *ev);
@@ -113,7 +113,7 @@ static int fpm_event_devpoll_init(int max) /* {{{ */
113113
/*
114114
* Clean the module
115115
*/
116-
static int fpm_event_devpoll_clean() /* {{{ */
116+
static int fpm_event_devpoll_clean(void) /* {{{ */
117117
{
118118
/* close /dev/poll if open */
119119
if (dpfd > -1) {

sapi/fpm/fpm/events/epoll.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ static int epollfd = -1;
4646

4747
#endif /* HAVE_EPOLL */
4848

49-
struct fpm_event_module_s *fpm_event_epoll_module(void) /* {{{ */
49+
struct fpm_event_module_s *fpm_event_epoll_module(void)
5050
{
5151
#ifdef HAVE_EPOLL
5252
return &epoll_module;
5353
#else
5454
return NULL;
5555
#endif /* HAVE_EPOLL */
5656
}
57-
/* }}} */
5857

5958
#ifdef HAVE_EPOLL
6059

@@ -92,7 +91,7 @@ static int fpm_event_epoll_init(int max) /* {{{ */
9291
/*
9392
* Clean the module
9493
*/
95-
static int fpm_event_epoll_clean() /* {{{ */
94+
static int fpm_event_epoll_clean(void)
9695
{
9796
/* free epollfds */
9897
if (epollfds) {
@@ -108,7 +107,6 @@ static int fpm_event_epoll_clean() /* {{{ */
108107

109108
return 0;
110109
}
111-
/* }}} */
112110

113111
/*
114112
* wait for events or timeout

sapi/fpm/fpm/events/poll.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ static int next_free_slot = 0;
5050
/*
5151
* return the module configuration
5252
*/
53-
struct fpm_event_module_s *fpm_event_poll_module(void) /* {{{ */
53+
struct fpm_event_module_s *fpm_event_poll_module(void)
5454
{
5555
#ifdef HAVE_POLL
5656
return &poll_module;
5757
#else
5858
return NULL;
5959
#endif /* HAVE_POLL */
6060
}
61-
/* }}} */
6261

6362
#ifdef HAVE_POLL
6463

@@ -104,7 +103,7 @@ static int fpm_event_poll_init(int max) /* {{{ */
104103
/*
105104
* Clean the module
106105
*/
107-
static int fpm_event_poll_clean() /* {{{ */
106+
static int fpm_event_poll_clean(void)
108107
{
109108
/* free pollfds */
110109
if (pollfds) {
@@ -121,7 +120,6 @@ static int fpm_event_poll_clean() /* {{{ */
121120
npollfds = 0;
122121
return 0;
123122
}
124-
/* }}} */
125123

126124
/*
127125
* wait for events or timeout

sapi/fpm/fpm/events/port.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <errno.h>
2727

2828
static int fpm_event_port_init(int max);
29-
static int fpm_event_port_clean();
29+
static int fpm_event_port_clean(void);
3030
static int fpm_event_port_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3131
static int fpm_event_port_add(struct fpm_event_s *ev);
3232
static int fpm_event_port_remove(struct fpm_event_s *ev);
@@ -90,7 +90,7 @@ static int fpm_event_port_init(int max) /* {{{ */
9090
/*
9191
* Clean the module
9292
*/
93-
static int fpm_event_port_clean() /* {{{ */
93+
static int fpm_event_port_clean(void)
9494
{
9595
if (pfd > -1) {
9696
close(pfd);
@@ -105,7 +105,6 @@ static int fpm_event_port_clean() /* {{{ */
105105
nevents = 0;
106106
return 0;
107107
}
108-
/* }}} */
109108

110109
/*
111110
* wait for events or timeout

sapi/fpm/fpm/events/select.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,14 @@ static fd_set fds;
5353
/*
5454
* return the module configuration
5555
*/
56-
struct fpm_event_module_s *fpm_event_select_module(void) /* {{{ */
56+
struct fpm_event_module_s *fpm_event_select_module(void)
5757
{
5858
#ifdef HAVE_SELECT
5959
return &select_module;
6060
#else
6161
return NULL;
6262
#endif /* HAVE_SELECT */
6363
}
64-
/* }}} */
6564

6665
#ifdef HAVE_SELECT
6766

sapi/fpm/fpm/fpm_children.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void fpm_children_cleanup(int which, void *arg) /* {{{ */
3838
}
3939
/* }}} */
4040

41-
static struct fpm_child_s *fpm_child_alloc(void) /* {{{ */
41+
static struct fpm_child_s *fpm_child_alloc(void)
4242
{
4343
struct fpm_child_s *ret;
4444

@@ -52,7 +52,6 @@ static struct fpm_child_s *fpm_child_alloc(void) /* {{{ */
5252
ret->scoreboard_i = -1;
5353
return ret;
5454
}
55-
/* }}} */
5655

5756
static void fpm_child_free(struct fpm_child_s *child) /* {{{ */
5857
{
@@ -177,7 +176,7 @@ int fpm_children_free(struct fpm_child_s *child) /* {{{ */
177176
}
178177
/* }}} */
179178

180-
void fpm_children_bury() /* {{{ */
179+
void fpm_children_bury(void)
181180
{
182181
int status;
183182
pid_t pid;
@@ -303,7 +302,6 @@ void fpm_children_bury() /* {{{ */
303302
}
304303
}
305304
}
306-
/* }}} */
307305

308306
static struct fpm_child_s *fpm_resources_prepare(struct fpm_worker_pool_s *wp) /* {{{ */
309307
{
@@ -472,7 +470,7 @@ int fpm_children_create_initial(struct fpm_worker_pool_s *wp) /* {{{ */
472470
}
473471
/* }}} */
474472

475-
int fpm_children_init_main() /* {{{ */
473+
int fpm_children_init_main(void)
476474
{
477475
if (fpm_global_config.emergency_restart_threshold &&
478476
fpm_global_config.emergency_restart_interval) {
@@ -492,4 +490,3 @@ int fpm_children_init_main() /* {{{ */
492490

493491
return 0;
494492
}
495-
/* }}} */

sapi/fpm/fpm/fpm_clock.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
static int monotonic_works;
1717

18-
int fpm_clock_init() /* {{{ */
18+
int fpm_clock_init(void) /* {{{ */
1919
{
2020
struct timespec ts;
2121

@@ -59,7 +59,7 @@ static clock_serv_t mach_clock;
5959

6060
/* this code borrowed from here: http://lists.apple.com/archives/Darwin-development/2002/Mar/msg00746.html */
6161
/* mach_clock also should be re-initialized in child process after fork */
62-
int fpm_clock_init() /* {{{ */
62+
int fpm_clock_init(void)
6363
{
6464
kern_return_t ret;
6565
mach_timespec_t aTime;
@@ -81,7 +81,6 @@ int fpm_clock_init() /* {{{ */
8181

8282
return 0;
8383
}
84-
/* }}} */
8584

8685
int fpm_clock_get(struct timeval *tv) /* {{{ */
8786
{
@@ -104,11 +103,10 @@ int fpm_clock_get(struct timeval *tv) /* {{{ */
104103

105104
#else /* no clock */
106105

107-
int fpm_clock_init() /* {{{ */
106+
int fpm_clock_init(void)
108107
{
109108
return 0;
110109
}
111-
/* }}} */
112110

113111
int fpm_clock_get(struct timeval *tv) /* {{{ */
114112
{

sapi/fpm/fpm/fpm_conf.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve
598598
}
599599
/* }}} */
600600

601-
static void *fpm_worker_pool_config_alloc(void) /* {{{ */
601+
static void *fpm_worker_pool_config_alloc(void)
602602
{
603603
struct fpm_worker_pool_s *wp;
604604

@@ -643,7 +643,6 @@ static void *fpm_worker_pool_config_alloc(void) /* {{{ */
643643
current_wp = wp;
644644
return wp->config;
645645
}
646-
/* }}} */
647646

648647
int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc) /* {{{ */
649648
{
@@ -808,7 +807,7 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
808807
}
809808
/* }}} */
810809

811-
static int fpm_conf_process_all_pools(void) /* {{{ */
810+
static int fpm_conf_process_all_pools(void)
812811
{
813812
struct fpm_worker_pool_s *wp, *wp2;
814813

@@ -1207,9 +1206,8 @@ static int fpm_conf_process_all_pools(void) /* {{{ */
12071206
}
12081207
return 0;
12091208
}
1210-
/* }}} */
12111209

1212-
int fpm_conf_unlink_pid() /* {{{ */
1210+
int fpm_conf_unlink_pid(void)
12131211
{
12141212
if (fpm_global_config.pid_file) {
12151213
if (0 > unlink(fpm_global_config.pid_file)) {
@@ -1219,9 +1217,8 @@ int fpm_conf_unlink_pid() /* {{{ */
12191217
}
12201218
return 0;
12211219
}
1222-
/* }}} */
12231220

1224-
int fpm_conf_write_pid() /* {{{ */
1221+
int fpm_conf_write_pid(void)
12251222
{
12261223
int fd;
12271224

@@ -1248,7 +1245,6 @@ int fpm_conf_write_pid() /* {{{ */
12481245
}
12491246
return 0;
12501247
}
1251-
/* }}} */
12521248

12531249
static int fpm_conf_post_process(int force_daemon) /* {{{ */
12541250
{
@@ -1692,7 +1688,7 @@ int fpm_conf_load_ini_file(char *filename) /* {{{ */
16921688
}
16931689
/* }}} */
16941690

1695-
static void fpm_conf_dump(void) /* {{{ */
1691+
static void fpm_conf_dump(void)
16961692
{
16971693
struct fpm_worker_pool_s *wp;
16981694

@@ -1802,7 +1798,6 @@ static void fpm_conf_dump(void) /* {{{ */
18021798
zlog(ZLOG_NOTICE, " ");
18031799
}
18041800
}
1805-
/* }}} */
18061801

18071802
int fpm_conf_init_main(int test_conf, int force_daemon) /* {{{ */
18081803
{

sapi/fpm/fpm/fpm_env.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int setenv(char *name, char *value, int overwrite) /* {{{ */
6060
#endif
6161

6262
#ifndef HAVE_CLEARENV
63-
void clearenv() /* {{{ */
63+
void clearenv(void)
6464
{
6565
char **envp;
6666
char *s;
@@ -79,7 +79,6 @@ void clearenv() /* {{{ */
7979
}
8080

8181
}
82-
/* }}} */
8382
#endif
8483

8584
#ifndef HAVE_UNSETENV
@@ -195,7 +194,7 @@ static int fpm_env_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */
195194
}
196195
/* }}} */
197196

198-
int fpm_env_init_main() /* {{{ */
197+
int fpm_env_init_main(void)
199198
{
200199
struct fpm_worker_pool_s *wp;
201200
char *title;
@@ -273,4 +272,3 @@ int fpm_env_init_main() /* {{{ */
273272
efree(title);
274273
return 0;
275274
}
276-
/* }}} */

sapi/fpm/fpm/fpm_events.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,17 @@ int fpm_event_pre_init(char *mechanism) /* {{{ */
304304
}
305305
/* }}} */
306306

307-
const char *fpm_event_mechanism_name() /* {{{ */
307+
const char *fpm_event_mechanism_name(void)
308308
{
309309
return module ? module->name : NULL;
310310
}
311-
/* }}} */
312311

313-
int fpm_event_support_edge_trigger() /* {{{ */
312+
int fpm_event_support_edge_trigger(void)
314313
{
315314
return module ? module->support_edge_trigger : 0;
316315
}
317-
/* }}} */
318316

319-
int fpm_event_init_main() /* {{{ */
317+
int fpm_event_init_main(void)
320318
{
321319
struct fpm_worker_pool_s *wp;
322320
int max;
@@ -352,7 +350,6 @@ int fpm_event_init_main() /* {{{ */
352350
}
353351
return 0;
354352
}
355-
/* }}} */
356353

357354
void fpm_event_loop(int err) /* {{{ */
358355
{

sapi/fpm/fpm/fpm_php.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,18 @@ static void fpm_php_cleanup(int which, void *arg) /* {{{ */
201201
}
202202
/* }}} */
203203

204-
void fpm_php_soft_quit() /* {{{ */
204+
void fpm_php_soft_quit(void)
205205
{
206206
fcgi_terminate();
207207
}
208-
/* }}} */
209208

210-
int fpm_php_init_main() /* {{{ */
209+
int fpm_php_init_main(void)
211210
{
212211
if (0 > fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0)) {
213212
return -1;
214213
}
215214
return 0;
216215
}
217-
/* }}} */
218216

219217
int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
220218
{

0 commit comments

Comments
 (0)