Fix non-ANSI function declarations.
The proper way to declare a function taking no parameters isn't: foo bar(); But this instead: foo bar(void); Signed-off-by: Cyril Brulebois <kibi@debian.org> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2843 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
f4ba2d4f24
commit
0c6a564543
|
@ -1000,7 +1000,7 @@ int config_parse_file(server *srv, config_t *context, const char *fn) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static char* getCWD() {
|
||||
static char* getCWD(void) {
|
||||
char *s, *s1;
|
||||
size_t len;
|
||||
#ifdef PATH_MAX
|
||||
|
|
|
@ -100,7 +100,7 @@ int fdevent_reset(fdevents *ev) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static fdnode *fdnode_init() {
|
||||
static fdnode *fdnode_init(void) {
|
||||
fdnode *fdn;
|
||||
|
||||
fdn = calloc(1, sizeof(*fdn));
|
||||
|
|
|
@ -82,7 +82,7 @@ typedef struct {
|
|||
buffer *response_header;
|
||||
} handler_ctx;
|
||||
|
||||
static handler_ctx * cgi_handler_ctx_init() {
|
||||
static handler_ctx * cgi_handler_ctx_init(void) {
|
||||
handler_ctx *hctx = calloc(1, sizeof(*hctx));
|
||||
|
||||
assert(hctx);
|
||||
|
|
|
@ -483,7 +483,7 @@ static int fastcgi_status_init(server *srv, buffer *b, fcgi_extension_host *host
|
|||
return 0;
|
||||
}
|
||||
|
||||
static handler_ctx * handler_ctx_init() {
|
||||
static handler_ctx * handler_ctx_init(void) {
|
||||
handler_ctx * hctx;
|
||||
|
||||
hctx = calloc(1, sizeof(*hctx));
|
||||
|
@ -521,7 +521,7 @@ static void handler_ctx_free(server *srv, handler_ctx *hctx) {
|
|||
free(hctx);
|
||||
}
|
||||
|
||||
static fcgi_proc *fastcgi_process_init() {
|
||||
static fcgi_proc *fastcgi_process_init(void) {
|
||||
fcgi_proc *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
@ -545,7 +545,7 @@ static void fastcgi_process_free(fcgi_proc *f) {
|
|||
free(f);
|
||||
}
|
||||
|
||||
static fcgi_extension_host *fastcgi_host_init() {
|
||||
static fcgi_extension_host *fastcgi_host_init(void) {
|
||||
fcgi_extension_host *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
@ -581,7 +581,7 @@ static void fastcgi_host_free(fcgi_extension_host *h) {
|
|||
|
||||
}
|
||||
|
||||
static fcgi_exts *fastcgi_extensions_init() {
|
||||
static fcgi_exts *fastcgi_extensions_init(void) {
|
||||
fcgi_exts *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
|
|
@ -114,7 +114,7 @@ typedef struct {
|
|||
/* ok, we need a prototype */
|
||||
static handler_t proxy_handle_fdevent(server *srv, void *ctx, int revents);
|
||||
|
||||
static handler_ctx * handler_ctx_init() {
|
||||
static handler_ctx * handler_ctx_init(void) {
|
||||
handler_ctx * hctx;
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct {
|
|||
plugin_config conf;
|
||||
} plugin_data;
|
||||
|
||||
static handler_ctx * handler_ctx_init() {
|
||||
static handler_ctx * handler_ctx_init(void) {
|
||||
handler_ctx * hctx;
|
||||
|
||||
hctx = calloc(1, sizeof(*hctx));
|
||||
|
|
|
@ -347,7 +347,7 @@ static void reset_signals(void) {
|
|||
signal(SIGUSR1, SIG_DFL);
|
||||
}
|
||||
|
||||
static handler_ctx * handler_ctx_init() {
|
||||
static handler_ctx * handler_ctx_init(void) {
|
||||
handler_ctx * hctx;
|
||||
|
||||
hctx = calloc(1, sizeof(*hctx));
|
||||
|
@ -388,7 +388,7 @@ static void handler_ctx_free(handler_ctx *hctx) {
|
|||
free(hctx);
|
||||
}
|
||||
|
||||
static scgi_proc *scgi_process_init() {
|
||||
static scgi_proc *scgi_process_init(void) {
|
||||
scgi_proc *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
@ -410,7 +410,7 @@ static void scgi_process_free(scgi_proc *f) {
|
|||
free(f);
|
||||
}
|
||||
|
||||
static scgi_extension_host *scgi_host_init() {
|
||||
static scgi_extension_host *scgi_host_init(void) {
|
||||
scgi_extension_host *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
@ -442,7 +442,7 @@ static void scgi_host_free(scgi_extension_host *h) {
|
|||
|
||||
}
|
||||
|
||||
static scgi_exts *scgi_extensions_init() {
|
||||
static scgi_exts *scgi_extensions_init(void) {
|
||||
scgi_exts *f;
|
||||
|
||||
f = calloc(1, sizeof(*f));
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef struct {
|
|||
plugin_config conf;
|
||||
} plugin_data;
|
||||
|
||||
static handler_ctx * handler_ctx_init() {
|
||||
static handler_ctx * handler_ctx_init(void) {
|
||||
handler_ctx * hctx;
|
||||
|
||||
hctx = calloc(1, sizeof(*hctx));
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef struct {
|
|||
int in_cond;
|
||||
} ssi_tokenizer_t;
|
||||
|
||||
ssi_val_t *ssi_val_init() {
|
||||
ssi_val_t *ssi_val_init(void) {
|
||||
ssi_val_t *s;
|
||||
|
||||
s = calloc(1, sizeof(*s));
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
static handler_t x(server *srv, connection *con, void *p_d)
|
||||
|
||||
#define INIT_FUNC(x) \
|
||||
static void *x()
|
||||
static void *x(void)
|
||||
|
||||
#define FREE_FUNC SERVER_FUNC
|
||||
#define TRIGGER_FUNC SERVER_FUNC
|
||||
|
|
|
@ -331,7 +331,7 @@ int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err)
|
|||
|
||||
/* {{{ test */
|
||||
#ifdef DEBUG_PROC_OPEN
|
||||
int main() {
|
||||
int main(void) {
|
||||
proc_handler_t proc;
|
||||
buffer *in = buffer_init(), *out = buffer_init(), *err = buffer_init();
|
||||
int wstatus;
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#ifdef HAVE_GETUID
|
||||
# ifndef HAVE_ISSETUGID
|
||||
|
||||
static int l_issetugid() {
|
||||
static int l_issetugid(void) {
|
||||
return (geteuid() != getuid() || getegid() != getgid());
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int main () {
|
||||
int main (void) {
|
||||
char* p;
|
||||
|
||||
while (FCGI_Accept() >= 0) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int main () {
|
||||
int main (void) {
|
||||
int num_requests = 2;
|
||||
|
||||
while (num_requests > 0 &&
|
||||
|
|
Loading…
Reference in New Issue