64 lines
1.8 KiB
Diff
64 lines
1.8 KiB
Diff
|
From d91acc645ad1204ded41cfecad337bf9c48952f6 Mon Sep 17 00:00:00 2001
|
||
|
From: Phillip Susi <psusi@ubuntu.com>
|
||
|
Date: Fri, 4 May 2018 10:12:05 -0400
|
||
|
Subject: [PATCH 83/92] 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.
|
||
|
---
|
||
|
configure.ac | 2 +-
|
||
|
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)
|
||
|
{
|
||
|
|
||
|
--
|
||
|
2.17.1
|
||
|
|