94c44f8fb614635b458b983d52db25c1ee11cc5a
[jackhill/guix/guix.git] / gnu / packages / patches / aspell-gcc-compat.patch
1 Fix GCC7 warnings.
2
3 Taken from upstream:
4 https://git.savannah.gnu.org/cgit/aspell.git/commit/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384
5
6 diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp
7 index a979539..19ab63c 100644
8 --- a/modules/filter/tex.cpp
9 +++ b/modules/filter/tex.cpp
10 @@ -174,7 +174,7 @@ namespace {
11
12 if (c == '{') {
13
14 - if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0')
15 + if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0')
16 push_command(Parm);
17
18 top.in_what = Parm;
19 diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp
20 index db54f3d..89ee09d 100644
21 --- a/prog/check_funs.cpp
22 +++ b/prog/check_funs.cpp
23 @@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) {
24 }
25 }
26 if (i == width-1) {
27 - if (word == '\0')
28 + if (*word == '\0')
29 put(out,' ');
30 else if (word[len] == '\0')
31 put(out, word, len);