diff --git a/daemon/unbound.c b/daemon/unbound.c index 7ec6edba1..73e9fcbb6 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -93,7 +93,7 @@ void* unbound_start_brk = 0; #endif /** print usage. */ -static void usage() +static void usage(void) { const char** m; const char *evnm="event", *evsys="", *evmethod=""; diff --git a/dns64/dns64.c b/dns64/dns64.c index 2fde67841..5fa2096b8 100644 --- a/dns64/dns64.c +++ b/dns64/dns64.c @@ -872,7 +872,7 @@ static struct module_func_block dns64_block = { * Function for returning the above function block. */ struct module_func_block * -dns64_get_funcblock() +dns64_get_funcblock(void) { return &dns64_block; } diff --git a/doc/Changelog b/doc/Changelog index 1b329969f..aff207843 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 5 September 2016: Wouter - Fix #829: doc of sldns_wire2str_rdata_buf() return value has an off-by-one typo, from Jinmei Tatuya (Infoblox). + - Fix incomplete prototypes reported by Dag-Erling Smørgrav. 2 September 2016: Wouter - Fix compile with openssl 1.1.0 with api=1.1.0. diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 9269fad0b..08b8641a4 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -172,7 +172,7 @@ struct ip_list { /** Give unbound-anchor usage, and exit (1). */ static void -usage() +usage(void) { printf("Usage: unbound-anchor [opts]\n"); printf(" Setup or update root anchor. " diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index b4536a173..51f8e648a 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -72,7 +72,7 @@ /** Give checkconf usage, and exit (1). */ static void -usage() +usage(void) { printf("Usage: unbound-checkconf [file]\n"); printf(" Checks unbound configuration file for errors.\n"); diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index f3e32d945..e054da3cf 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -65,7 +65,7 @@ /** Give unbound-control usage, and exit (1). */ static void -usage() +usage(void) { printf("Usage: unbound-control [options] command\n"); printf(" Remote control utility for unbound server.\n"); diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 25e1c9577..d7a36a231 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -72,7 +72,7 @@ static int verb = 0; /** Give unbound-host usage, and exit (1). */ static void -usage() +usage(void) { printf("Usage: unbound-host [-vdhr46] [-c class] [-t type] hostname\n"); printf(" [-y key] [-f keyfile] [-F namedkeyfile]\n"); diff --git a/testcode/lock_verify.c b/testcode/lock_verify.c index 786d523c3..de2882b24 100644 --- a/testcode/lock_verify.c +++ b/testcode/lock_verify.c @@ -105,7 +105,7 @@ static int verb = 0; /** print program usage help */ static void -usage() +usage(void) { printf("lock_verify \n"); } diff --git a/testcode/memstats.c b/testcode/memstats.c index fc56c0d3c..1cca02e74 100644 --- a/testcode/memstats.c +++ b/testcode/memstats.c @@ -66,7 +66,7 @@ struct codeline { /** print usage and exit */ static void -usage() +usage(void) { printf("usage: memstats \n"); printf("statistics are printed on stdout.\n"); diff --git a/testcode/petal.c b/testcode/petal.c index c22ac7e3e..def0f5e25 100644 --- a/testcode/petal.c +++ b/testcode/petal.c @@ -70,7 +70,7 @@ static int verb = 0; /** Give petal usage, and exit (1). */ static void -usage() +usage(void) { printf("Usage: petal [opts]\n"); printf(" https daemon serves files from ./'host'/filename\n"); diff --git a/testcode/signit.c b/testcode/signit.c index af4e0fe37..0eca0e088 100644 --- a/testcode/signit.c +++ b/testcode/signit.c @@ -63,7 +63,7 @@ struct keysets { /** print usage and exit */ static void -usage() +usage(void) { printf("usage: signit expi ince keytag owner keyfile\n"); printf("present rrset data on stdin.\n"); diff --git a/testcode/testbound.c b/testcode/testbound.c index 674b39ac8..00502eea8 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -67,7 +67,7 @@ static struct config_strlist* cfgfiles = NULL; /** give commandline usage for testbound. */ static void -testbound_usage() +testbound_usage(void) { printf("usage: testbound [options]\n"); printf("\ttest the unbound daemon.\n"); diff --git a/testcode/testpkts.c b/testcode/testpkts.c index d1960a410..c9ad9d069 100644 --- a/testcode/testpkts.c +++ b/testcode/testpkts.c @@ -239,7 +239,7 @@ static void adjustline(char* line, struct entry* e, } /** create new entry */ -static struct entry* new_entry() +static struct entry* new_entry(void) { struct entry* e = (struct entry*)malloc(sizeof(struct entry)); if(!e) error("out of memory"); diff --git a/util/storage/lookup3.c b/util/storage/lookup3.c index ddcb56e74..e9b05af37 100644 --- a/util/storage/lookup3.c +++ b/util/storage/lookup3.c @@ -820,7 +820,7 @@ uint32_t hashbig( const void *key, size_t length, uint32_t initval) #ifdef SELF_TEST /* used for timings */ -void driver1() +void driver1(void) { uint8_t buf[256]; uint32_t i; @@ -842,7 +842,7 @@ void driver1() #define HASHLEN 1 #define MAXPAIR 60 #define MAXLEN 70 -void driver2() +void driver2(void) { uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1]; uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z; @@ -912,7 +912,7 @@ void driver2() } /* Check for reading beyond the end of the buffer and alignment problems */ -void driver3() +void driver3(void) { uint8_t buf[MAXLEN+20], *b; uint32_t len; @@ -1003,7 +1003,7 @@ void driver3() } /* check for problems with nulls */ - void driver4() + void driver4(void) { uint8_t buf[1]; uint32_t h,i,state[HASHSTATE]; @@ -1020,7 +1020,7 @@ void driver3() } -int main() +int main(void) { driver1(); /* test that the key is hashed: used for timings */ driver2(); /* test that whole key is hashed thoroughly */ diff --git a/util/ub_event.c b/util/ub_event.c index ebf9029e7..3b92be1a3 100644 --- a/util/ub_event.c +++ b/util/ub_event.c @@ -137,7 +137,7 @@ static void (*NATIVE_BITS_CB(void (*cb)(int, short, void*)))(int, short, void*) #define AS_EVENT(x) ((struct event*)x) #define AS_UB_EVENT(x) ((struct ub_event*)x) -const char* ub_event_get_version() +const char* ub_event_get_version(void) { return event_get_version(); } diff --git a/util/ub_event.h b/util/ub_event.h index cb42e7a7d..9739e6d83 100644 --- a/util/ub_event.h +++ b/util/ub_event.h @@ -63,7 +63,7 @@ struct event_base; * daemon compile, and will be "pluggable-event" for * libunbound. */ -const char* ub_event_get_version(); +const char* ub_event_get_version(void); /** Return the name, system and method for the pluggable event base */ void ub_get_event_sys(struct ub_event_base*, const char** n, const char** s, const char** m); diff --git a/util/ub_event_pluggable.c b/util/ub_event_pluggable.c index c30880a54..4a9451263 100644 --- a/util/ub_event_pluggable.c +++ b/util/ub_event_pluggable.c @@ -147,7 +147,7 @@ struct my_event { #define AS_MY_EVENT_BASE(x) ((struct my_event_base*)x) #define AS_MY_EVENT(x) ((struct my_event*)x) -const char* ub_event_get_version() +const char* ub_event_get_version(void) { return "pluggable-event"PACKAGE_VERSION; } diff --git a/winrc/win_svc.c b/winrc/win_svc.c index 74ace69fb..ac97ef68b 100644 --- a/winrc/win_svc.c +++ b/winrc/win_svc.c @@ -565,7 +565,7 @@ win_do_cron(void* ATTR_UNUSED(arg)) /** Set the timer for cron for the next wake up */ static void -set_cron_timer() +set_cron_timer(void) { struct timeval tv; int crontime;