fix building with GCC 7
This commit is contained in:
Nikola Forró 2017-02-23 17:23:45 +01:00
parent 51d82ebb1a
commit 137cc1a6c0
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,34 @@
commit 8089fa02122fed0a6394eba14bbedcb1d18e2384
Author: Kevin Atkinson <kevina@gnu.org>
Date: Thu Dec 29 00:50:31 2016 -0500
Compile Fixes for GCC 7.
Closes #519.
diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp
index a979539..19ab63c 100644
--- a/modules/filter/tex.cpp
+++ b/modules/filter/tex.cpp
@@ -174,7 +174,7 @@ namespace {
if (c == '{') {
- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0')
+ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0')
push_command(Parm);
top.in_what = Parm;
diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp
index db54f3d..89ee09d 100644
--- a/prog/check_funs.cpp
+++ b/prog/check_funs.cpp
@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) {
}
}
if (i == width-1) {
- if (word == '\0')
+ if (*word == '\0')
put(out,' ');
else if (word[len] == '\0')
put(out, word, len);

View File

@ -1,7 +1,7 @@
Summary: Spell checker
Name: aspell
Version: 0.60.6.1
Release: 15%{?dist}
Release: 16%{?dist}
Epoch: 12
# LGPLv2+ .. common/gettext.h
# LGPLv2 .. modules/speller/default/phonet.hpp,
@ -24,6 +24,8 @@ Patch4: aspell-0.60.6-mp.patch
Patch5: aspell-0.60.6.1-dump-personal-abort.patch
# resolves: #925034
Patch6: aspell-0.60.6.1-aarch64.patch
# resolves: #1423239
Patch7: aspell-0.60.6.1-gcc7-fixes.patch
BuildRequires: chrpath, gettext, ncurses-devel, pkgconfig, perl
Requires(pre): /sbin/install-info
@ -60,6 +62,7 @@ and header files needed for Aspell development.
%patch4 -p1 -b .ai
%patch5 -p1 -b .dump-personal
%patch6 -p1 -b .aarch64
%patch7 -p1 -b .gcc7-fixes
iconv -f iso-8859-2 -t utf-8 < manual/aspell.info > manual/aspell.info.aux
mv manual/aspell.info.aux manual/aspell.info
@ -152,6 +155,10 @@ fi
%{_mandir}/man1/pspell-config.1*
%changelog
* Thu Feb 23 2017 Nikola Forró <nforro@redhat.com> - 12:0.60.6.1-16
- resolves: #1423239
fix building with GCC 7
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 12:0.60.6.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild