Commit a9d42623 authored by info@mobile-stream.com's avatar info@mobile-stream.com Committed by Leonardo Arena

main/gnats: fix build with gcc8 (-Werror too strict)

gcc8 reports one meaningful -Wpointer-compare (mail.c) bug and
a pair of harmless -Wimplicit-fallthrough (misc.c, regex.c) cases.

The mail.c patch could be replaced with -Wno-error=pointer-compare
if the code behaviour change is too risky (upstream seems dead).
parent 51978afa
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnats
pkgver=4.2.0
pkgrel=3
pkgrel=4
pkgdesc="The GNU Bug Tracking System"
url="https://www.gnu.org/software/gnats/"
arch="all"
......@@ -9,7 +9,9 @@ license="GPL-3.0"
depends="postfix"
makedepends="texinfo"
install=
source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz
gnats-gcc8.patch
"
subpackages="$pkgname-doc"
pkgusers="gnats"
pkggroups="gnats"
......@@ -35,6 +37,5 @@ package() {
rm -f "$pkgdir"/gnats.el
}
md5sums="b2fb3bbaea6688b8341769569f4a6e70 gnats-4.2.0.tar.gz"
sha256sums="54e3f4eb5e6ceaec3f9579332e5ff492ce743f763b9c9cdd7ad72fe9cc2b142d gnats-4.2.0.tar.gz"
sha512sums="650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152 gnats-4.2.0.tar.gz"
sha512sums="650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152 gnats-4.2.0.tar.gz
616882229b0b0bfb26ed23fcf63c8888c51575eb92b82c19fe9d25128e8f5a20e6b52ed80ecff2ec4405c1c37e24268bab7fa7c068d2df47641d8e5b06d2895a gnats-gcc8.patch"
--- a/gnats/mail.c
+++ b/gnats/mail.c
@@ -67,7 +67,7 @@
if (res != NULL)
{
if (res->admFields[ResponsibleAdmAlias] == NULL ||
- res->admFields[ResponsibleAdmAlias] == '\0')
+ *res->admFields[ResponsibleAdmAlias] == '\0')
{
if (res->admFields[ResponsibleAdmAlias] != NULL)
{
--- a/gnats/misc.c
+++ b/gnats/misc.c
@@ -108,6 +108,7 @@
fprintf (gnats_logfile, "%s", buf);
break;
}
+ /* fallthrough */
/* No log file, log to stderr. */
case STDERR:
fprintf (stderr, "%s", buf);
--- a/gnats/regex.c
+++ b/gnats/regex.c
@@ -2310,6 +2310,7 @@
if ((syntax & RE_BK_PLUS_QM)
|| (syntax & RE_LIMITED_OPS))
goto normal_char;
+ /* fallthrough */
handle_plus:
case '*':
/* If there is no previous pattern... */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment