Codebase list tayga / 3480830
squelch some GCC warnings Barak A. Pearlmutter 5 years ago
3 changed file(s) with 62 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net>
1 Date: Tue, 19 Feb 2019 12:02:21 +0000
2 Subject: include for writev
3
4 nat64.c:119:6: warning: implicit declaration of function `writev'; did you mean `write'? [-Wimplicit-function-declaration]
5 if (writev(gcfg->tun_fd, iov, data_len ? 2 : 1) < 0)
6 ^~~~~~
7 write
8 ---
9 tayga.h | 1 +
10 1 file changed, 1 insertion(+)
11
12 diff --git a/tayga.h b/tayga.h
13 index 2284d2a..c8aadb8 100644
14 --- a/tayga.h
15 +++ b/tayga.h
16 @@ -20,6 +20,7 @@
17 #include <sys/stat.h>
18 #include <sys/ioctl.h>
19 #include <sys/socket.h>
20 +#include <sys/uio.h>
21 #include <netinet/in.h>
22 #include <arpa/inet.h>
23 #include <unistd.h>
0 From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net>
1 Date: Tue, 19 Feb 2019 12:06:01 +0000
2 Subject: null char
3
4 conffile.c:225:12: warning: assignment to `char' from `void *' makes integer from pointer without a cast [-Wint-conversion]
5 slash[0] = NULL;
6 ^
7 conffile.c:240:12: warning: assignment to `char' from `void *' makes integer from pointer without a cast [-Wint-conversion]
8 slash[0] = NULL;
9 ^
10 ---
11 conffile.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 diff --git a/conffile.c b/conffile.c
15 index dd4193c..0406cfd 100644
16 --- a/conffile.c
17 +++ b/conffile.c
18 @@ -222,7 +222,7 @@ static void config_map(int ln, int arg_count, char **args)
19 unsigned int prefix4 = 32;
20 if (slash) {
21 prefix4 = atoi(slash+1);
22 - slash[0] = NULL;
23 + slash[0] = '\0';
24 }
25
26 if (!inet_pton(AF_INET, args[0], &m->map4.addr)) {
27 @@ -237,7 +237,7 @@ static void config_map(int ln, int arg_count, char **args)
28 slash = strchr(args[1], '/');
29 if (slash) {
30 prefix6 = atoi(slash+1);
31 - slash[0] = NULL;
32 + slash[0] = '\0';
33 }
34
35 if ((32 - prefix4) != (128 - prefix6)) {
66 0007-static-EAM.patch
77 0008-manpage-RFC.patch
88 0009-systemd-service-file-for-tayga.patch
9 0010-include-for-writev.patch
10 0011-null-char.patch