sparse fixup: warning: non-ANSI function declaration of function '...'

This commit is contained in:
Sven-Haegar Koch 2011-05-28 03:57:20 +02:00 committed by Guus Sliepen
parent d772289f6d
commit f4010694b3
10 changed files with 15 additions and 19 deletions

View file

@ -368,7 +368,7 @@ void read_config_options(splay_tree_t *config_tree, const char *prefix) {
} }
} }
bool read_server_config() { bool read_server_config(void) {
char *fname; char *fname;
bool x; bool x;

View file

@ -130,7 +130,7 @@ bool control_h(connection_t *c, char *request) {
} }
} }
bool init_control() { bool init_control(void) {
randomize(controlcookie, sizeof controlcookie / 2); randomize(controlcookie, sizeof controlcookie / 2);
bin2hex(controlcookie, controlcookie, sizeof controlcookie / 2); bin2hex(controlcookie, controlcookie, sizeof controlcookie / 2);
controlcookie[sizeof controlcookie - 1] = 0; controlcookie[sizeof controlcookie - 1] = 0;
@ -153,6 +153,6 @@ bool init_control() {
return true; return true;
} }
void exit_control() { void exit_control(void) {
unlink(controlcookiename); unlink(controlcookiename);
} }

View file

@ -316,7 +316,7 @@ void sssp_bfs(void) {
list_free(todo_list); list_free(todo_list);
} }
static void check_reachability() { static void check_reachability(void) {
splay_node_t *node, *next; splay_node_t *node, *next;
node_t *n; node_t *n;
char *name; char *name;

View file

@ -143,7 +143,7 @@ static void keyexpire_handler(int fd, short events, void *data) {
regenerate_key(); regenerate_key();
} }
void regenerate_key() { void regenerate_key(void) {
if(timeout_initialized(&keyexpire_event)) { if(timeout_initialized(&keyexpire_event)) {
ifdebug(STATUS) logger(LOG_INFO, "Expiring symmetric keys"); ifdebug(STATUS) logger(LOG_INFO, "Expiring symmetric keys");
event_del(&keyexpire_event); event_del(&keyexpire_event);

View file

@ -25,7 +25,7 @@
#include "crypto.h" #include "crypto.h"
void crypto_init() { void crypto_init(void) {
RAND_load_file("/dev/urandom", 1024); RAND_load_file("/dev/urandom", 1024);
ENGINE_load_builtin_engines(); ENGINE_load_builtin_engines();
@ -34,7 +34,7 @@ void crypto_init() {
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
} }
void crypto_exit() { void crypto_exit(void) {
EVP_cleanup(); EVP_cleanup();
} }

View file

@ -34,7 +34,7 @@
static bool mykeyused = false; static bool mykeyused = false;
void send_key_changed() { void send_key_changed(void) {
splay_node_t *node; splay_node_t *node;
connection_t *c; connection_t *c;

View file

@ -53,7 +53,7 @@ static subnet_t *cache_mac_subnet[2];
static bool cache_mac_valid[2]; static bool cache_mac_valid[2];
static int cache_mac_slot; static int cache_mac_slot;
void subnet_cache_flush() { void subnet_cache_flush(void) {
cache_ipv4_valid[0] = cache_ipv4_valid[1] = false; cache_ipv4_valid[0] = cache_ipv4_valid[1] = false;
cache_ipv6_valid[0] = cache_ipv6_valid[1] = false; cache_ipv6_valid[0] = cache_ipv6_valid[1] = false;
cache_mac_valid[0] = cache_mac_valid[1] = false; cache_mac_valid[0] = cache_mac_valid[1] = false;

View file

@ -282,7 +282,7 @@ static void make_names(void) {
} }
} }
static void free_names() { static void free_names(void) {
if (identname) free(identname); if (identname) free(identname);
if (netname) free(netname); if (netname) free(netname);
if (controlcookiename) free(controlcookiename); if (controlcookiename) free(controlcookiename);
@ -290,7 +290,7 @@ static void free_names() {
if (confbase) free(confbase); if (confbase) free(confbase);
} }
static bool drop_privs() { static bool drop_privs(void) {
#ifdef HAVE_MINGW #ifdef HAVE_MINGW
if (switchuser) { if (switchuser) {
logger(LOG_ERR, "%s not supported on this platform", "-U"); logger(LOG_ERR, "%s not supported on this platform", "-U");

View file

@ -128,7 +128,7 @@ static void update(int fd) {
} }
} }
static void redraw() { static void redraw(void) {
erase(); erase();
mvprintw(0, 0, "Tinc %-16s Nodes: %4d Sort: %-8s %s", netname, node_list.count, sortname[sortmode], cumulative ? "Cumulative" : "Current"); mvprintw(0, 0, "Tinc %-16s Nodes: %4d Sort: %-8s %s", netname, node_list.count, sortname[sortmode], cumulative ? "Cumulative" : "Current");

View file

@ -70,8 +70,7 @@ xalloc_fail (int size)
/* Allocate N bytes of memory dynamically, with error checking. */ /* Allocate N bytes of memory dynamically, with error checking. */
void * void *
xmalloc (n) xmalloc (size_t n)
size_t n;
{ {
void *p; void *p;
@ -84,8 +83,7 @@ xmalloc (n)
/* Allocate N bytes of memory dynamically, and set it all to zero. */ /* Allocate N bytes of memory dynamically, and set it all to zero. */
void * void *
xmalloc_and_zero (n) xmalloc_and_zero (size_t n)
size_t n;
{ {
void *p; void *p;
@ -101,9 +99,7 @@ xmalloc_and_zero (n)
If P is NULL, run xmalloc. */ If P is NULL, run xmalloc. */
void * void *
xrealloc (p, n) xrealloc (void *p, size_t n)
void *p;
size_t n;
{ {
p = realloc (p, n); p = realloc (p, n);
if (p == 0) if (p == 0)