[arch-commits] Commit in apvlv/trunk (PKGBUILD gcc7.patch)
Evangelos Foutras
foutrelis at archlinux.org
Wed Oct 4 23:18:54 UTC 2017
Date: Wednesday, October 4, 2017 @ 23:18:53
Author: foutrelis
Revision: 261596
Fix build with GCC 7
Added:
apvlv/trunk/gcc7.patch
Modified:
apvlv/trunk/PKGBUILD
------------+
PKGBUILD | 7 +++++--
gcc7.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-10-04 23:14:58 UTC (rev 261595)
+++ PKGBUILD 2017-10-04 23:18:53 UTC (rev 261596)
@@ -15,10 +15,12 @@
depends=('gtk3' 'poppler-glib' 'djvulibre')
makedepends=('cmake')
source=($pkgname-$pkgver.tar.gz::https://github.com/naihe2010/apvlv/archive/v$pkgver.tar.gz
- gcc6.patch)
+ gcc6.patch
+ gcc7.patch)
backup=('etc/apvlvrc')
md5sums=('e200e1f8ad7e765399d08845d6de2c9b'
- 'a0cb038ddb3c3e0c8a0e991f1deb2ad3')
+ 'a0cb038ddb3c3e0c8a0e991f1deb2ad3'
+ 'dd9713d10716c43dab7722d8b6107ea8')
prepare() {
cd $pkgname-$pkgver
@@ -25,6 +27,7 @@
# Fix build
patch -Np1 -i ../gcc6.patch
+ patch -Np1 -i ../gcc7.patch
}
build() {
Added: gcc7.patch
===================================================================
--- gcc7.patch (rev 0)
+++ gcc7.patch 2017-10-04 23:18:53 UTC (rev 261596)
@@ -0,0 +1,47 @@
+From 9da539016cb6c317388020f4ebce1793077aa126 Mon Sep 17 00:00:00 2001
+From: Ryan Reno <ryan.reno at outlook.com>
+Date: Fri, 23 Jun 2017 21:56:22 -0700
+Subject: [PATCH] Changed comparions to remove compiler errors. In one case
+ changed to compare against a NULL pointer and another, the pointer was
+ dereferenced to compare against a char
+
+---
+ src/ApvlvCmds.cc | 4 ++--
+ src/ApvlvCore.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ApvlvCmds.cc b/src/ApvlvCmds.cc
+index c7422f7..d4c40dd 100644
+--- a/src/ApvlvCmds.cc
++++ b/src/ApvlvCmds.cc
+@@ -192,7 +192,7 @@ namespace apvlv
+ const char *ApvlvCmd::append (const char *s)
+ {
+ size_t len;
+- char *e;
++ char *e = strchr((char *)s, '>');
+
+ len = strlen (s);
+
+@@ -200,7 +200,7 @@ namespace apvlv
+
+ if (len >= 4
+ && *s == '<'
+- && (e = strchr ((char *) s, '>')) != '\0' && *(s + 2) != '-')
++ && (*e != '\0' && *(s + 2) != '-'))
+ {
+ e++;
+ StringKeyMap::iterator it;
+diff --git a/src/ApvlvCore.cc b/src/ApvlvCore.cc
+index 672e5ef..e6e34f7 100644
+--- a/src/ApvlvCore.cc
++++ b/src/ApvlvCore.cc
+@@ -90,7 +90,7 @@ namespace apvlv
+ {
+ mInuse = use;
+
+- if (mInuse == false && gView->hasloaded (filename (), type ()) == false)
++ if (mInuse == false && gView->hasloaded (filename (), type ()) == NULL)
+ {
+ debug ("core :%p is not needed, delete it\n", this);
+ delete this;
More information about the arch-commits
mailing list