Skip to content

Commit e2a5428

Browse files
committed
FPM fix strict prototype warnings.
Closes GH-8986.
1 parent f866295 commit e2a5428

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+116
-184
lines changed

sapi/fpm/fpm/events/devpoll.c

Lines changed: 3 additions & 5 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);
@@ -51,15 +51,14 @@ static int npollfds = 0;
5151

5252
#endif /* HAVE_DEVPOLL */
5353

54-
struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
54+
struct fpm_event_module_s *fpm_event_devpoll_module(void)
5555
{
5656
#ifdef HAVE_DEVPOLL
5757
return &devpoll_module;
5858
#else
5959
return NULL;
6060
#endif /* HAVE_DEVPOLL */
6161
}
62-
/* }}} */
6362

6463
#ifdef HAVE_DEVPOLL
6564

@@ -113,7 +112,7 @@ static int fpm_event_devpoll_init(int max) /* {{{ */
113112
/*
114113
* Clean the module
115114
*/
116-
static int fpm_event_devpoll_clean() /* {{{ */
115+
static int fpm_event_devpoll_clean(void)
117116
{
118117
/* close /dev/poll if open */
119118
if (dpfd > -1) {
@@ -136,7 +135,6 @@ static int fpm_event_devpoll_clean() /* {{{ */
136135
npollfds = 0;
137136
return 0;
138137
}
139-
/* }}} */
140138

141139
/*
142140
* wait for events or timeout

sapi/fpm/fpm/events/devpoll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#include "../fpm_config.h"
2121
#include "../fpm_events.h"
2222

23-
struct fpm_event_module_s *fpm_event_devpoll_module();
23+
struct fpm_event_module_s *fpm_event_devpoll_module(void);
2424

2525
#endif /* FPM_EVENTS_DEVPOLL_H */

sapi/fpm/fpm/events/epoll.c

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

2727
static int fpm_event_epoll_init(int max);
28-
static int fpm_event_epoll_clean();
28+
static int fpm_event_epoll_clean(void);
2929
static int fpm_event_epoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3030
static int fpm_event_epoll_add(struct fpm_event_s *ev);
3131
static int fpm_event_epoll_remove(struct fpm_event_s *ev);
@@ -46,15 +46,14 @@ static int epollfd = -1;
4646

4747
#endif /* HAVE_EPOLL */
4848

49-
struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
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/epoll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#include "../fpm_config.h"
2121
#include "../fpm_events.h"
2222

23-
struct fpm_event_module_s *fpm_event_epoll_module();
23+
struct fpm_event_module_s *fpm_event_epoll_module(void);
2424

2525
#endif /* FPM_EVENTS_EPOLL_H */

sapi/fpm/fpm/events/poll.c

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

2828
static int fpm_event_poll_init(int max);
29-
static int fpm_event_poll_clean();
29+
static int fpm_event_poll_clean(void);
3030
static int fpm_event_poll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3131
static int fpm_event_poll_add(struct fpm_event_s *ev);
3232
static int fpm_event_poll_remove(struct fpm_event_s *ev);
@@ -50,22 +50,21 @@ static int next_free_slot = 0;
5050
/*
5151
* return the module configuration
5252
*/
53-
struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
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

6564
/*
6665
* Init the module
6766
*/
68-
static int fpm_event_poll_init(int max) /* {{{ */
67+
static int fpm_event_poll_init(int max)
6968
{
7069
int i;
7170

@@ -99,12 +98,11 @@ static int fpm_event_poll_init(int max) /* {{{ */
9998
npollfds = max;
10099
return 0;
101100
}
102-
/* }}} */
103101

104102
/*
105103
* Clean the module
106104
*/
107-
static int fpm_event_poll_clean() /* {{{ */
105+
static int fpm_event_poll_clean(void)
108106
{
109107
/* free pollfds */
110108
if (pollfds) {
@@ -121,7 +119,6 @@ static int fpm_event_poll_clean() /* {{{ */
121119
npollfds = 0;
122120
return 0;
123121
}
124-
/* }}} */
125122

126123
/*
127124
* wait for events or timeout

sapi/fpm/fpm/events/poll.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#include "../fpm_config.h"
2121
#include "../fpm_events.h"
2222

23-
struct fpm_event_module_s *fpm_event_poll_module();
23+
struct fpm_event_module_s *fpm_event_poll_module(void);
2424

2525
#endif /* FPM_EVENTS_POLL_H */

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/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#include "../fpm_config.h"
2121
#include "../fpm_events.h"
2222

23-
struct fpm_event_module_s *fpm_event_port_module();
23+
struct fpm_event_module_s *fpm_event_port_module(void);
2424

2525
#endif /* FPM_EVENTS_PORT_H */

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() /* {{{ */
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/events/select.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
#include "../fpm_config.h"
2121
#include "../fpm_events.h"
2222

23-
struct fpm_event_module_s *fpm_event_select_module();
23+
struct fpm_event_module_s *fpm_event_select_module(void);
2424

2525
#endif /* FPM_EVENTS_SELECT_H */

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() /* {{{ */
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() /* {{{ */
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_children.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
1414
int fpm_children_free(struct fpm_child_s *child);
15-
void fpm_children_bury();
16-
int fpm_children_init_main();
15+
void fpm_children_bury(void);
16+
int fpm_children_init_main(void);
1717
int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to_spawn, int is_debug);
1818

1919
struct fpm_child_s;

sapi/fpm/fpm/fpm_clock.c

Lines changed: 3 additions & 6 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

@@ -27,7 +27,6 @@ int fpm_clock_init() /* {{{ */
2727

2828
return 0;
2929
}
30-
/* }}} */
3130

3231
int fpm_clock_get(struct timeval *tv) /* {{{ */
3332
{
@@ -59,7 +58,7 @@ static clock_serv_t mach_clock;
5958

6059
/* this code borrowed from here: http://lists.apple.com/archives/Darwin-development/2002/Mar/msg00746.html */
6160
/* mach_clock also should be re-initialized in child process after fork */
62-
int fpm_clock_init() /* {{{ */
61+
int fpm_clock_init(void)
6362
{
6463
kern_return_t ret;
6564
mach_timespec_t aTime;
@@ -81,7 +80,6 @@ int fpm_clock_init() /* {{{ */
8180

8281
return 0;
8382
}
84-
/* }}} */
8583

8684
int fpm_clock_get(struct timeval *tv) /* {{{ */
8785
{
@@ -104,11 +102,10 @@ int fpm_clock_get(struct timeval *tv) /* {{{ */
104102

105103
#else /* no clock */
106104

107-
int fpm_clock_init() /* {{{ */
105+
int fpm_clock_init(void)
108106
{
109107
return 0;
110108
}
111-
/* }}} */
112109

113110
int fpm_clock_get(struct timeval *tv) /* {{{ */
114111
{

sapi/fpm/fpm/fpm_clock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <sys/time.h>
77

8-
int fpm_clock_init();
8+
int fpm_clock_init(void);
99
int fpm_clock_get(struct timeval *tv);
1010

1111
#endif

0 commit comments

Comments
 (0)