sparse fixup: warning: symbol '...' was not declared. Should it be static?
This commit is contained in:
parent
02e32cf61e
commit
d772289f6d
11 changed files with 27 additions and 25 deletions
|
@ -57,6 +57,7 @@
|
|||
#include "subnet.h"
|
||||
#include "utils.h"
|
||||
#include "xalloc.h"
|
||||
#include "graph.h"
|
||||
|
||||
/* Implementation of Kruskal's algorithm.
|
||||
Running time: O(E)
|
||||
|
@ -112,7 +113,7 @@ void mst_kruskal(void) {
|
|||
Running time: O(N^2)
|
||||
*/
|
||||
|
||||
void sssp_dijkstra(void) {
|
||||
static void sssp_dijkstra(void) {
|
||||
splay_node_t *node, *to;
|
||||
edge_t *e;
|
||||
node_t *n, *m;
|
||||
|
@ -315,7 +316,7 @@ void sssp_bfs(void) {
|
|||
list_free(todo_list);
|
||||
}
|
||||
|
||||
void check_reachability() {
|
||||
static void check_reachability() {
|
||||
splay_node_t *node, *next;
|
||||
node_t *n;
|
||||
char *name;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "route.h"
|
||||
#include "utils.h"
|
||||
#include "xalloc.h"
|
||||
#include "device.h"
|
||||
|
||||
typedef enum device_type_t {
|
||||
DEVICE_TYPE_ETHERTAP,
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#include "xalloc.h"
|
||||
|
||||
int keylifetime = 0;
|
||||
int keyexpires = 0;
|
||||
static int keyexpires = 0;
|
||||
#ifdef HAVE_LZO
|
||||
static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
|
||||
#endif
|
||||
|
@ -150,7 +150,7 @@ void send_mtu_probe(node_t *n) {
|
|||
send_mtu_probe_handler(0, 0, n);
|
||||
}
|
||||
|
||||
void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
|
||||
static void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
|
||||
ifdebug(TRAFFIC) logger(LOG_INFO, "Got MTU probe length %d from %s (%s)", packet->len, n->name, n->hostname);
|
||||
|
||||
if(!packet->data[0]) {
|
||||
|
|
|
@ -81,7 +81,7 @@ bool read_rsa_public_key(connection_t *c) {
|
|||
return result;
|
||||
}
|
||||
|
||||
bool read_rsa_private_key() {
|
||||
static bool read_rsa_private_key(void) {
|
||||
FILE *fp;
|
||||
char *fname;
|
||||
char *n, *d;
|
||||
|
@ -220,7 +220,7 @@ void load_all_subnets(void) {
|
|||
/*
|
||||
Configure node_t myself and set up the local sockets (listen only)
|
||||
*/
|
||||
bool setup_myself(void) {
|
||||
static bool setup_myself(void) {
|
||||
config_t *cfg;
|
||||
subnet_t *subnet;
|
||||
char *name, *hostname, *mode, *afname, *cipher, *digest;
|
||||
|
|
|
@ -449,7 +449,7 @@ begin:
|
|||
return;
|
||||
}
|
||||
|
||||
void handle_meta_write(int sock, short events, void *data) {
|
||||
static void handle_meta_write(int sock, short events, void *data) {
|
||||
ifdebug(META) logger(LOG_DEBUG, "handle_meta_write() called");
|
||||
|
||||
connection_t *c = data;
|
||||
|
@ -466,7 +466,7 @@ void handle_meta_write(int sock, short events, void *data) {
|
|||
event_del(&c->outevent);
|
||||
}
|
||||
|
||||
void handle_meta_connection_error(struct bufferevent *event, short what, void *data) {
|
||||
static void handle_meta_connection_error(struct bufferevent *event, short what, void *data) {
|
||||
connection_t *c = data;
|
||||
logger(LOG_ERR, "handle_meta_connection_error() called: %d: %s", what, strerror(errno));
|
||||
terminate_connection(c, c->status.active);
|
||||
|
@ -564,7 +564,7 @@ void handle_new_meta_connection(int sock, short events, void *data) {
|
|||
send_id(c);
|
||||
}
|
||||
|
||||
void free_outgoing(outgoing_t *outgoing) {
|
||||
static void free_outgoing(outgoing_t *outgoing) {
|
||||
if(outgoing->ai)
|
||||
freeaddrinfo(outgoing->ai);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ extern char **g_argv;
|
|||
extern bool use_logfile;
|
||||
|
||||
#ifndef HAVE_MINGW
|
||||
sigset_t emptysigset;
|
||||
static sigset_t emptysigset;
|
||||
#endif
|
||||
|
||||
static void memory_full(int size) {
|
||||
|
|
|
@ -195,7 +195,7 @@ bool seen_request(char *request) {
|
|||
}
|
||||
}
|
||||
|
||||
void age_past_requests(int fd, short events, void *data) {
|
||||
static void age_past_requests(int fd, short events, void *data) {
|
||||
splay_node_t *node, *next;
|
||||
past_request_t *p;
|
||||
int left = 0, deleted = 0;
|
||||
|
|
|
@ -30,19 +30,19 @@
|
|||
#include "top.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
char *program_name = NULL;
|
||||
static char *program_name = NULL;
|
||||
|
||||
/* If nonzero, display usage information and exit. */
|
||||
bool show_help = false;
|
||||
static bool show_help = false;
|
||||
|
||||
/* If nonzero, print the version on standard output and exit. */
|
||||
bool show_version = false;
|
||||
static bool show_version = false;
|
||||
|
||||
/* If nonzero, it will attempt to kill a running tincd and exit. */
|
||||
int kill_tincd = 0;
|
||||
static int kill_tincd = 0;
|
||||
|
||||
/* If nonzero, generate public/private keypair for this host/net. */
|
||||
int generate_keys = 0;
|
||||
static int generate_keys = 0;
|
||||
|
||||
static char *name = NULL;
|
||||
static char *identname = NULL; /* program name for syslog */
|
||||
|
|
|
@ -64,19 +64,19 @@
|
|||
#include "xalloc.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
char *program_name = NULL;
|
||||
static char *program_name = NULL;
|
||||
|
||||
/* If nonzero, display usage information and exit. */
|
||||
bool show_help = false;
|
||||
static bool show_help = false;
|
||||
|
||||
/* If nonzero, print the version on standard output and exit. */
|
||||
bool show_version = false;
|
||||
static bool show_version = false;
|
||||
|
||||
/* If nonzero, use null ciphers and skip all key exchanges. */
|
||||
bool bypass_security = false;
|
||||
|
||||
/* If nonzero, disable swapping for this process. */
|
||||
bool do_mlock = false;
|
||||
static bool do_mlock = false;
|
||||
|
||||
/* If nonzero, chroot to netdir after startup. */
|
||||
static bool do_chroot = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef struct nodestats_t {
|
|||
bool known;
|
||||
} nodestats_t;
|
||||
|
||||
const char *const sortname[] = {
|
||||
static const char *const sortname[] = {
|
||||
"name",
|
||||
"in pkts",
|
||||
"in bytes",
|
||||
|
@ -50,8 +50,8 @@ const char *const sortname[] = {
|
|||
"tot bytes",
|
||||
};
|
||||
|
||||
int sortmode = 0;
|
||||
bool cumulative = false;
|
||||
static int sortmode = 0;
|
||||
static bool cumulative = false;
|
||||
|
||||
static list_t node_list;
|
||||
static struct timeval now, prev, diff;
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#include "../src/logger.h"
|
||||
#include "utils.h"
|
||||
|
||||
const char hexadecimals[] = "0123456789ABCDEF";
|
||||
static const char hexadecimals[] = "0123456789ABCDEF";
|
||||
|
||||
int charhex2bin(char c) {
|
||||
static int charhex2bin(char c) {
|
||||
if(isdigit(c))
|
||||
return c - '0';
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue