diff options
author | Barak A. Pearlmutter <barak+git@pearlmutter.net> | 2019-02-19 14:22:59 +0000 |
---|---|---|
committer | Barak A. Pearlmutter <barak+git@pearlmutter.net> | 2019-02-19 14:32:20 +0000 |
commit | 34808306defa8e2fa3af2e7bb822a29003f89c37 (patch) | |
tree | 9b1dfe0fa779b3d5a18b1438fe096b64d3e6308c | |
parent | 0f9f785deb27074acb85ddb7e98234c53d020cbd (diff) |
squelch some GCC warnings
-rw-r--r-- | debian/patches/0010-include-for-writev.patch | 24 | ||||
-rw-r--r-- | debian/patches/0011-null-char.patch | 36 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 62 insertions, 0 deletions
diff --git a/debian/patches/0010-include-for-writev.patch b/debian/patches/0010-include-for-writev.patch new file mode 100644 index 0000000..60d6680 --- /dev/null +++ b/debian/patches/0010-include-for-writev.patch @@ -0,0 +1,24 @@ +From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net> +Date: Tue, 19 Feb 2019 12:02:21 +0000 +Subject: include for writev + +nat64.c:119:6: warning: implicit declaration of function `writev'; did you mean `write'? [-Wimplicit-function-declaration] + if (writev(gcfg->tun_fd, iov, data_len ? 2 : 1) < 0) + ^~~~~~ + write +--- + tayga.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tayga.h b/tayga.h +index 2284d2a..c8aadb8 100644 +--- a/tayga.h ++++ b/tayga.h +@@ -20,6 +20,7 @@ + #include <sys/stat.h> + #include <sys/ioctl.h> + #include <sys/socket.h> ++#include <sys/uio.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <unistd.h> diff --git a/debian/patches/0011-null-char.patch b/debian/patches/0011-null-char.patch new file mode 100644 index 0000000..092a331 --- /dev/null +++ b/debian/patches/0011-null-char.patch @@ -0,0 +1,36 @@ +From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net> +Date: Tue, 19 Feb 2019 12:06:01 +0000 +Subject: null char + +conffile.c:225:12: warning: assignment to `char' from `void *' makes integer from pointer without a cast [-Wint-conversion] + slash[0] = NULL; + ^ +conffile.c:240:12: warning: assignment to `char' from `void *' makes integer from pointer without a cast [-Wint-conversion] + slash[0] = NULL; + ^ +--- + conffile.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/conffile.c b/conffile.c +index dd4193c..0406cfd 100644 +--- a/conffile.c ++++ b/conffile.c +@@ -222,7 +222,7 @@ static void config_map(int ln, int arg_count, char **args) + unsigned int prefix4 = 32; + if (slash) { + prefix4 = atoi(slash+1); +- slash[0] = NULL; ++ slash[0] = '\0'; + } + + if (!inet_pton(AF_INET, args[0], &m->map4.addr)) { +@@ -237,7 +237,7 @@ static void config_map(int ln, int arg_count, char **args) + slash = strchr(args[1], '/'); + if (slash) { + prefix6 = atoi(slash+1); +- slash[0] = NULL; ++ slash[0] = '\0'; + } + + if ((32 - prefix4) != (128 - prefix6)) { diff --git a/debian/patches/series b/debian/patches/series index ed19915..ec312e9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,5 @@ 0007-static-EAM.patch 0008-manpage-RFC.patch 0009-systemd-service-file-for-tayga.patch +0010-include-for-writev.patch +0011-null-char.patch |