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.patch152
1 files changed, 0 insertions, 152 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
deleted file mode 100644
index 361d53ca6c..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
+++ /dev/null
@@ -1,152 +0,0 @@
1From a6c991750ae6ebd87a0b9b243bec7fd8e5a064c5 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
9Fix super0.c issue which is triggered only in DEBUG_BUILD with -O1 (or any
10configuration without -ftree-vrp or with -fno-tree-vrp)
11
12super0.c: In function 'examine_super0':
13super0.c:238:32: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
14 snprintf(nb, sizeof(nb), "%4d", d);
15 ^
16
17Upstream-Status: Inappropriate [Workaround]
18
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20
21---
22 Monitor.c | 4 +++-
23 mdopen.c | 4 ++++
24 super-ddf.c | 4 ++++
25 super-intel.c | 6 ++++++
26 super0.c | 2 +-
27 super1.c | 5 +++++
28 6 files changed, 23 insertions(+), 2 deletions(-)
29
30diff --git a/Monitor.c b/Monitor.c
31index 036103f..08cbd0a 100644
32--- a/Monitor.c
33+++ b/Monitor.c
34@@ -445,7 +445,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
35 event, dev);
36 }
37 }
38-
39+#pragma GCC diagnostic push
40+#pragma GCC diagnostic ignored "-Wformat-truncation"
41 static int check_array(struct state *st, struct mdstat_ent *mdstat,
42 int test, struct alert_info *ainfo,
43 int increments, char *prefer)
44@@ -673,6 +674,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
45 st->err++;
46 goto out;
47 }
48+#pragma GCC diagnostic pop
49
50 static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
51 int test, struct alert_info *info)
52diff --git a/mdopen.c b/mdopen.c
53index 98c54e4..4f72b69 100644
54--- a/mdopen.c
55+++ b/mdopen.c
56@@ -26,6 +26,9 @@
57 #include "md_p.h"
58 #include <ctype.h>
59
60+#pragma GCC diagnostic push
61+#pragma GCC diagnostic ignored "-Wformat-truncation"
62+
63 void make_parts(char *dev, int cnt)
64 {
65 /* make 'cnt' partition devices for 'dev'
66@@ -101,6 +104,7 @@ void make_parts(char *dev, int cnt)
67 }
68 free(name);
69 }
70+#pragma GCC diagnostic pop
71
72 int create_named_array(char *devnm)
73 {
74diff --git a/super-ddf.c b/super-ddf.c
75index 618542c..6ed4e7e 100644
76--- a/super-ddf.c
77+++ b/super-ddf.c
78@@ -2828,6 +2828,9 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl)
79 (unsigned long long)cfs, (unsigned long long)(dl->size-cfs));
80 }
81
82+#pragma GCC diagnostic push
83+#pragma GCC diagnostic ignored "-Wformat-overflow"
84+
85 /* Add a device to a container, either while creating it or while
86 * expanding a pre-existing container
87 */
88@@ -2964,6 +2967,7 @@ static int add_to_super_ddf(struct supertype *st,
89
90 return 0;
91 }
92+#pragma GCC diagnostic pop
93
94 static int remove_from_super_ddf(struct supertype *st, mdu_disk_info_t *dk)
95 {
96diff --git a/super-intel.c b/super-intel.c
97index 1bc4b80..39d0e92 100644
98--- a/super-intel.c
99+++ b/super-intel.c
100@@ -333,6 +333,11 @@ struct md_list {
101 };
102
103 #define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg))
104+#pragma GCC diagnostic push
105+# if __GNUC__ == 8
106+# pragma GCC diagnostic ignored "-Wstringop-truncation"
107+# endif
108+#pragma GCC diagnostic ignored "-Wformat-truncation"
109
110 static __u8 migr_type(struct imsm_dev *dev)
111 {
112@@ -12208,3 +12213,4 @@ struct superswitch super_imsm = {
113 .clear_bad_block = imsm_clear_badblock,
114 .get_bad_blocks = imsm_get_badblocks,
115 };
116+#pragma GCC diagnostic pop
117diff --git a/super0.c b/super0.c
118index 42989b9..f5e8031 100644
119--- a/super0.c
120+++ b/super0.c
121@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost)
122 d++) {
123 mdp_disk_t *dp;
124 char *dv;
125- char nb[11];
126+ char nb[12];
127 int wonly, failfast;
128 if (d>=0) dp = &sb->disks[d];
129 else dp = &sb->this_disk;
130diff --git a/super1.c b/super1.c
131index 636a286..f894cbb 100644
132--- a/super1.c
133+++ b/super1.c
134@@ -1176,6 +1176,10 @@ static struct mdinfo *container_content1(struct supertype *st, char *subarray)
135 return info;
136 }
137
138+#pragma GCC diagnostic push
139+# if __GNUC__ == 8
140+# pragma GCC diagnostic ignored "-Wstringop-truncation"
141+#endif
142 static int update_super1(struct supertype *st, struct mdinfo *info,
143 char *update, char *devname, int verbose,
144 int uuid_set, char *homehost)
145@@ -1641,6 +1645,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info,
146
147 return 1;
148 }
149+#pragma GCC diagnostic pop
150
151 struct devinfo {
152 int fd;