summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch b/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
new file mode 100644
index 0000000000..8cf52406c4
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
@@ -0,0 +1,130 @@
1From b83218de2623c0bbe9af355a81ae8385d7f30cfc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 May 2018 12:56:41 -0700
4Subject: [PATCH] Disable gcc8 warnings
5
6This is needed until
7https://bugzilla.redhat.com/show_bug.cgi?id=1553958
8
9Upstream-Status: Inappropriate [Workaround]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13---
14 Monitor.c | 4 +++-
15 mdopen.c | 4 ++++
16 super-ddf.c | 4 ++++
17 super-intel.c | 6 ++++++
18 super1.c | 5 +++++
19 5 files changed, 22 insertions(+), 1 deletion(-)
20
21diff --git a/Monitor.c b/Monitor.c
22index 802a9d9..23b246b 100644
23--- a/Monitor.c
24+++ b/Monitor.c
25@@ -441,7 +441,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
26 event, dev);
27 }
28 }
29-
30+#pragma GCC diagnostic push
31+#pragma GCC diagnostic ignored "-Wformat-truncation"
32 static int check_array(struct state *st, struct mdstat_ent *mdstat,
33 int test, struct alert_info *ainfo,
34 int increments, char *prefer)
35@@ -683,6 +684,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
36 return 1;
37 return 0;
38 }
39+#pragma GCC diagnostic pop
40
41 static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
42 int test, struct alert_info *info)
43diff --git a/mdopen.c b/mdopen.c
44index 685ca32..406aba4 100644
45--- a/mdopen.c
46+++ b/mdopen.c
47@@ -26,6 +26,9 @@
48 #include "md_p.h"
49 #include <ctype.h>
50
51+#pragma GCC diagnostic push
52+#pragma GCC diagnostic ignored "-Wformat-truncation"
53+
54 void make_parts(char *dev, int cnt)
55 {
56 /* make 'cnt' partition devices for 'dev'
57@@ -99,6 +102,7 @@ void make_parts(char *dev, int cnt)
58 }
59 free(name);
60 }
61+#pragma GCC diagnostic pop
62
63 /*
64 * We need a new md device to assemble/build/create an array.
65diff --git a/super-ddf.c b/super-ddf.c
66index 1707ad1..e08d289 100644
67--- a/super-ddf.c
68+++ b/super-ddf.c
69@@ -2846,6 +2846,9 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl)
70 (unsigned long long)cfs, (unsigned long long)(dl->size-cfs));
71 }
72
73+#pragma GCC diagnostic push
74+#pragma GCC diagnostic ignored "-Wformat-overflow"
75+
76 /* Add a device to a container, either while creating it or while
77 * expanding a pre-existing container
78 */
79@@ -2981,6 +2984,7 @@ static int add_to_super_ddf(struct supertype *st,
80
81 return 0;
82 }
83+#pragma GCC diagnostic pop
84
85 static int remove_from_super_ddf(struct supertype *st, mdu_disk_info_t *dk)
86 {
87diff --git a/super-intel.c b/super-intel.c
88index 00a2925..44fbead 100644
89--- a/super-intel.c
90+++ b/super-intel.c
91@@ -298,6 +298,11 @@ struct md_list {
92 };
93
94 #define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg))
95+#pragma GCC diagnostic push
96+# if __GNUC__ == 8
97+# pragma GCC diagnostic ignored "-Wstringop-truncation"
98+# endif
99+#pragma GCC diagnostic ignored "-Wformat-truncation"
100
101 static __u8 migr_type(struct imsm_dev *dev)
102 {
103@@ -11618,3 +11623,4 @@ struct superswitch super_imsm = {
104 .get_bad_blocks = imsm_get_badblocks,
105 #endif /* MDASSEMBLE */
106 };
107+#pragma GCC diagnostic pop
108diff --git a/super1.c b/super1.c
109index 87a74cb..71c515f 100644
110--- a/super1.c
111+++ b/super1.c
112@@ -1091,6 +1091,10 @@ static struct mdinfo *container_content1(struct supertype *st, char *subarray)
113 return info;
114 }
115
116+#pragma GCC diagnostic push
117+# if __GNUC__ == 8
118+# pragma GCC diagnostic ignored "-Wstringop-truncation"
119+#endif
120 static int update_super1(struct supertype *st, struct mdinfo *info,
121 char *update,
122 char *devname, int verbose,
123@@ -1473,6 +1477,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info,
124
125 return 1;
126 }
127+#pragma GCC diagnostic pop
128
129 struct devinfo {
130 int fd;