Fix some compiler warnings.
This commit is contained in:
parent
a80c18dd20
commit
8de8f1d9e2
5 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue