diff options
author | Phillip Susi <psusi@ubuntu.com> | 2018-05-04 10:12:05 -0400 |
---|---|---|
committer | Phillip Susi <psusi@ubuntu.com> | 2018-05-07 13:30:19 -0400 |
commit | d91acc645ad1204ded41cfecad337bf9c48952f6 (patch) | |
tree | 9703fcc708e3503b011453ee54df56e903fb68d5 | |
parent | ba5e0451b51c983e40afd123b6e0d3eddb55e610 (diff) | |
download | parted-d91acc645ad1204ded41cfecad337bf9c48952f6.tar.gz |
Fix make check
Make check failed due to some warnings treated as errors. One was
caused by a warning that a function could have the noreturn attribute.
It seems that this had previously been disabled but gcc has changed
the flag from -Wmissing-noreturn to -Wsuggest-attribute=noreturn. The
recently added volser.c test also caused a few warnings when not
compiled on s390x because most of the functions were no used, so #if
those out as well.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libparted/tests/volser.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 738c697..056478f 100644 --- a/configure.ac +++ b/configure.ac @@ -226,7 +226,7 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wpacked" nw="$nw -Wmissing-prototypes" nw="$nw -Wmissing-declarations" - nw="$nw -Wmissing-noreturn" + nw="$nw -Wsuggest-attribute=noreturn" # things I might fix soon: nw="$nw -Wfloat-equal" # sort.c, seq.c nw="$nw -Wmissing-format-attribute" # copy.c diff --git a/libparted/tests/volser.c b/libparted/tests/volser.c index 9063821..c6efa5f 100644 --- a/libparted/tests/volser.c +++ b/libparted/tests/volser.c @@ -14,6 +14,8 @@ #include "common.h" #include "progname.h" +#if defined __s390__ || defined __s390x__ + /* set dasd first */ static char vol_devno[7] = {0}; static char *tmp_disk; @@ -75,7 +77,6 @@ END_TEST START_TEST (test_check_volser) { - char vol[7] = {0}; char vol_long[] = "abcdefg"; char vol_short[] = "ab_c "; char vol_null[] = " "; @@ -135,6 +136,8 @@ START_TEST (test_reuse_vtoc) } END_TEST +#endif + int main (int argc, char **argv) { |