- Fix incomplete prototypes reported by Dag-Erling Smørgrav.

git-svn-id: file:///svn/unbound/trunk@3848 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2016-09-05 07:23:23 +00:00
parent f4bf45d809
commit 1508a5bb2c
18 changed files with 22 additions and 21 deletions

View File

@ -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="";

View File

@ -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;
}

View File

@ -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.

View File

@ -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. "

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -105,7 +105,7 @@ static int verb = 0;
/** print program usage help */
static void
usage()
usage(void)
{
printf("lock_verify <trace files>\n");
}

View File

@ -66,7 +66,7 @@ struct codeline {
/** print usage and exit */
static void
usage()
usage(void)
{
printf("usage: memstats <logfile>\n");
printf("statistics are printed on stdout.\n");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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 */

View File

@ -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();
}

View File

@ -63,7 +63,7 @@ struct event_base;
* daemon compile, and will be "pluggable-event<PACKAGE_VERSION>" 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);

View File

@ -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;
}

View File

@ -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;