Mail archive
alpine-aports

[alpine-aports] [PATCH] main/arpon: fix build with gcc8 (useful -Werror)

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Tue, 20 Nov 2018 22:10:57 +0000

gcc8 reports one -Werror=pointer-compare case with the actual problem and
several harmless -Werror=implicit-fallthrough so fix everything with a patch.
---
 main/arpon/APKBUILD         | 10 +++-------
 main/arpon/arpon-gcc8.patch | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 7 deletions(-)
 create mode 100644 main/arpon/arpon-gcc8.patch
diff --git a/main/arpon/APKBUILD b/main/arpon/APKBUILD
index 8ad77d90db..e8ee2069a8 100644
--- a/main/arpon/APKBUILD
+++ b/main/arpon/APKBUILD
_at_@ -3,7 +3,7 @@
 pkgname=arpon
 pkgver=3.0
 _realver=3.0-ng
-pkgrel=0
+pkgrel=1
 pkgdesc="Arp handler inspectiON is a handler daemon with tools to handle all ARP aspects"
 url="http://arpon.sourceforge.net/"
 arch="all"
_at_@ -13,6 +13,7 @@ makedepends="libdnet-dev libpcap-dev libnet-dev cmake"
 install=""
 subpackages="$pkgname-doc"
 source="https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/ArpON-${_realver}.tar.gz
+		arpon-gcc8.patch
 		arpon.initd
 		arpon.confd
 		"
_at_@ -33,12 +34,7 @@ package() {
 	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
 }
 
-md5sums="a89ef9bc18e6f0fc9aa8a89aa676a281  ArpON-3.0-ng.tar.gz
-60ff0f9c6d035861d8cd608982b02d63  arpon.initd
-26986bed19b28cec66ed08447d22efaf  arpon.confd"
-sha256sums="ea55d1641b4573b19103ca596368e418aecd2a1409adbdce3a9f76dc8ebad590  ArpON-3.0-ng.tar.gz
-89169274080a1e7287f065970c13c912e9f7b966c6fe8c498c0d3321c03e0633  arpon.initd
-5ffa4f833e511037c07c68617d139d6f6c769ff2a1024b7a0aa863ded83a58de  arpon.confd"
 sha512sums="e6338018d65f3f8300958e168a9eb6f6be85cba21ae0aee4b03e9838a29a06afbf2448c2f104367aa18389cc549e4489bcf8dad384ad46eadf2884a0908238af  ArpON-3.0-ng.tar.gz
+eb4b9087a61c31fa99a7c4104e20172101b4ac3abcd448a41bdd31a81768a3dc996c9b220fd50b3c8906c050c4362c0cef300f5625cb02a7f51246783a915786  arpon-gcc8.patch
 9a7c862c3b07e31da091906b61339680b23af154c088eb259f2540916273d8e5f4dc6af5f883564d5b2ede6552b55376aa37b413270f837067ec5ce3d61a076f  arpon.initd
 c368acd8b0f9945a750e5c39a22fdad2a10f117270cd07f641333fbb9c22223cbf18809665d8675732408e820da5a806dac10c78ab0b9f2dae58cacbe58c61c1  arpon.confd"
diff --git a/main/arpon/arpon-gcc8.patch b/main/arpon/arpon-gcc8.patch
new file mode 100644
index 0000000000..87c4cf8843
--- /dev/null
+++ b/main/arpon/arpon-gcc8.patch
_at_@ -0,0 +1,37 @@
+--- a/src/opt.c
++++ b/src/opt.c
+_at_@ -222,6 +222,7 @@
+                 /* Print the version command option, cleanup and exit. */
+                 std_version();
+                 exit_cleanup(true);
++		break;
+ 
+             case 'h':
+                 MSG_DEBUG("-h or --help command option");
+_at_@ -229,6 +230,7 @@
+                 /* Print the help screen command option, cleanup and exit. */
+                 std_help();
+                 exit_cleanup(true);
++		break;
+ 
+             case '?':
+             case ':':
+_at_@ -285,7 +287,7 @@
+     }
+ 
+     /* Re-initialize the interface name command option to no interface? */
+-    if (opt->interface != '\0')
++    if (*opt->interface != '\0')
+         memset(opt->interface, '\0', (size_t)IF_NAMESIZE);
+ 
+     /* Set the value of the interface name command option. */
+--- a/src/sig.c
++++ b/src/sig.c
+_at_@ -204,6 +204,7 @@
+             case SIGINT:
+                 /* Remove ^C symbol from the output terminal. */
+                 printf("\r");
++		/* fallthrough */
+ 
+             case SIGTERM:
+                 MSG_DEBUG("Caught %s (%d)..", SIG_ITOA(sig), sig);
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Nov 20 2018 - 22:10:57 UTC