]>
Commit | Line | Data |
---|---|---|
74a816df MK |
1 | From d91acc645ad1204ded41cfecad337bf9c48952f6 Mon Sep 17 00:00:00 2001 |
2 | From: Phillip Susi <psusi@ubuntu.com> | |
3 | Date: Fri, 4 May 2018 10:12:05 -0400 | |
4 | Subject: [PATCH 83/92] Fix make check | |
5 | ||
6 | Make check failed due to some warnings treated as errors. One was | |
7 | caused by a warning that a function could have the noreturn attribute. | |
8 | It seems that this had previously been disabled but gcc has changed | |
9 | the flag from -Wmissing-noreturn to -Wsuggest-attribute=noreturn. The | |
10 | recently added volser.c test also caused a few warnings when not | |
11 | compiled on s390x because most of the functions were no used, so #if | |
12 | those out as well. | |
13 | --- | |
14 | configure.ac | 2 +- | |
15 | libparted/tests/volser.c | 5 ++++- | |
16 | 2 files changed, 5 insertions(+), 2 deletions(-) | |
17 | ||
18 | diff --git a/configure.ac b/configure.ac | |
19 | index 738c697..056478f 100644 | |
20 | --- a/configure.ac | |
21 | +++ b/configure.ac | |
22 | @@ -226,7 +226,7 @@ if test "$gl_gcc_warnings" = yes; then | |
23 | nw="$nw -Wpacked" | |
24 | nw="$nw -Wmissing-prototypes" | |
25 | nw="$nw -Wmissing-declarations" | |
26 | - nw="$nw -Wmissing-noreturn" | |
27 | + nw="$nw -Wsuggest-attribute=noreturn" | |
28 | # things I might fix soon: | |
29 | nw="$nw -Wfloat-equal" # sort.c, seq.c | |
30 | nw="$nw -Wmissing-format-attribute" # copy.c | |
31 | diff --git a/libparted/tests/volser.c b/libparted/tests/volser.c | |
32 | index 9063821..c6efa5f 100644 | |
33 | --- a/libparted/tests/volser.c | |
34 | +++ b/libparted/tests/volser.c | |
35 | @@ -14,6 +14,8 @@ | |
36 | #include "common.h" | |
37 | #include "progname.h" | |
38 | ||
39 | +#if defined __s390__ || defined __s390x__ | |
40 | + | |
41 | /* set dasd first */ | |
42 | static char vol_devno[7] = {0}; | |
43 | static char *tmp_disk; | |
44 | @@ -75,7 +77,6 @@ END_TEST | |
45 | ||
46 | START_TEST (test_check_volser) | |
47 | { | |
48 | - char vol[7] = {0}; | |
49 | char vol_long[] = "abcdefg"; | |
50 | char vol_short[] = "ab_c "; | |
51 | char vol_null[] = " "; | |
52 | @@ -135,6 +136,8 @@ START_TEST (test_reuse_vtoc) | |
53 | } | |
54 | END_TEST | |
55 | ||
56 | +#endif | |
57 | + | |
58 | int main (int argc, char **argv) | |
59 | { | |
60 | ||
61 | -- | |
62 | 2.17.1 | |
63 |