From: Guus Sliepen Date: Tue, 17 May 2011 08:58:22 +0000 (+0200) Subject: Fix some compiler warnings. X-Git-Tag: import-tinc-1.1~526 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=8de8f1d9e2c2c02d4a14a5506e7d0d914dc328da;p=meshlink Fix some compiler warnings. --- diff --git a/src/buffer.c b/src/buffer.c index 72888b50..249e3e0f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -58,7 +58,7 @@ char *buffer_prepare(buffer_t *buffer, int size) { // Copy data into the buffer. -char *buffer_add(buffer_t *buffer, const char *data, int size) { +void buffer_add(buffer_t *buffer, const char *data, int size) { memcpy(buffer_prepare(buffer, size), data, size); } diff --git a/src/buffer.h b/src/buffer.h index db22ac4f..73c1f69e 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -10,7 +10,7 @@ typedef struct buffer_t { extern void buffer_compact(buffer_t *buffer); extern char *buffer_prepare(buffer_t *buffer, int size); -extern char *buffer_add(buffer_t *buffer, const char *data, int size); +extern void buffer_add(buffer_t *buffer, const char *data, int size); extern char *buffer_readline(buffer_t *buffer); extern char *buffer_read(buffer_t *buffer, int size); extern void buffer_clear(buffer_t *buffer); diff --git a/src/meta.c b/src/meta.c index 1fbd22c2..ac937750 100644 --- a/src/meta.c +++ b/src/meta.c @@ -72,7 +72,7 @@ void broadcast_meta(connection_t *from, const char *buffer, int length) { } bool receive_meta(connection_t *c) { - int inlen, reqlen; + int inlen; char inbuf[MAXBUFSIZE]; char *bufp = inbuf, *endp; diff --git a/src/node.h b/src/node.h index 38e0e064..9164085c 100644 --- a/src/node.h +++ b/src/node.h @@ -97,6 +97,7 @@ extern void node_del(node_t *); extern node_t *lookup_node(char *); extern node_t *lookup_node_udp(const sockaddr_t *); extern bool dump_nodes(struct connection_t *); +extern bool dump_traffic(struct connection_t *); extern void update_node_udp(node_t *, const sockaddr_t *); #endif /* __TINC_NODE_H__ */ diff --git a/src/tincctl.c b/src/tincctl.c index 489d10cd..641fb9c4 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -522,7 +522,6 @@ int main(int argc, char *argv[], char *envp[]) { } bool do_graph = false; - int dumps = 1; if(!strcasecmp(argv[optind+1], "nodes")) sendline(fd, "%d %d", CONTROL, REQ_DUMP_NODES); @@ -536,7 +535,6 @@ int main(int argc, char *argv[], char *envp[]) { sendline(fd, "%d %d", CONTROL, REQ_DUMP_NODES); sendline(fd, "%d %d", CONTROL, REQ_DUMP_EDGES); do_graph = true; - dumps = 2; printf("digraph {\n"); } else { fprintf(stderr, "Unknown dump type '%s'.\n", argv[optind+1]);