[OE-core] [PATCH] mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they served at one point has either been fixed differently, or accepted upstream. Add a new patch to make clang's diagnostics happy Signed-off-by: Khem Raj --- V2: Keep mdadm-fix-ptest-build-errors.patch V3: Keep 0001-mdadm.h-Undefine-dprintf-before-redefining.patch ...abs-diff-in-a-standard-compliant-way.patch | 31 .../files/0001-Disable-gcc8-warnings.patch| 152 -- ...smacros.h-for-major-minor-defintions.patch | 44 - ...omment-to-indicate-valid-fallthrough.patch | 124 -- .../mdadm/files/gcc-4.9.patch | 31 meta/recipes-extended/mdadm/mdadm_4.1.bb | 20 ++- 6 files changed, 40 insertions(+), 362 deletions(-) create mode 100644 meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch delete mode 100644 meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch delete mode 100644 meta/recipes-extended/mdadm/files/gcc-4.9.patch diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch new file mode 100644 index 00..803a59b3ec --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch @@ -0,0 +1,31 @@ +From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Dec 2018 17:22:39 -0800 +Subject: [PATCH] Compute abs diff in a standard compliant way + +This make it a bit less implementation defined and silences clang +warning -Wabsolute-value + +| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi +gned long long' has no effect [-Werror,-Wabsolute-value] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + super-intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super-intel.c b/super-intel.c +index 6438987..10d7218 100644 +--- a/super-intel.c b/super-intel.c +@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map, +* 2048 blocks per each device. If the difference is higher it means +* that array size was expanded and num_data_stripes was not updated. +*/ +- if ((unsigned int)abs(calc_dev_size - dev_size) > ++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) > + (1 << SECT_PER_MB_SHIFT) * member_disks) { + component_size = dev_size / member_disks; + dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n", 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..00 --- a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch +++ /dev/null @@ -1,152 +0,0 @@ -From a6c991750ae6ebd87a0b9b243bec7fd8e5a064c5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 9 May 2018 12:56:41 -0700 -Subject: [PATCH] Disable gcc8 warnings - -This is needed until -https://bugzilla.redhat.com/show_bug.cgi?id=1553958 - -Fix super0.c issue which is triggered only in DEBUG_BUILD with -O1 (or any -configuration without -ftree-vrp or with -fno-tree-vrp) - -super0.c: In function 'examine_super0': -super0.c:238:32: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] - snprintf(nb, sizeof(nb), "%4d", d); -^ - -Upstream-Status: Inappropriate [Workaround] - -Signed-off-by: Khem Raj - - Monitor.c | 4 +++- - mdopen.c | 4 - super-ddf.c | 4 - super-intel.c | 6 ++ - super0.c | 2 +- - super1.c | 5 + - 6 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/Monitor.c b/Monitor.c -index 036103f..08cbd0a 100644 a/Monitor.c -+++ b/Monitor.c -@@ -445,7 +445,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) - event, dev); - } - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-truncation" - static int check_array(struct state *st, struct mdstat_ent *mdstat, - int test, struct alert_info *ainfo, - int increments, char *prefer) -@@ -673,6 +674,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, - st->err++; - goto out; - } -+#pragma GCC diagnostic pop - - static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist, - int test, struct alert_info *info) -diff --git a/mdopen.c b/mdopen.c -index
[OE-core] [PATCH 2/2] create_manifest3: Dont match filenames which contain the directory name for new manifest
When creating a new python3 manifest, there is a corner case on which the filepath for a certain dependency that was found, could contain the path of an existing folder, e.g. ${libdir}/python3/xmlrpclib.py module path contains ${libdir}/python3/xml, this causes an issue where the dependency doesnt get eventually added on FILES for that module. This patch checks if the dependency that was found is a directory, if it is, it checks if it matches one of the existing directories on the manifest, if it is not, then it checks if the dependency's path (without the filename) matches one of the directories. Signed-off-by: Alejandro Enedino Hernandez Samaniego --- meta/recipes-devtools/python/python3/create_manifest3.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py index f7d4587..4da02a2 100644 --- a/meta/recipes-devtools/python/python3/create_manifest3.py +++ b/meta/recipes-devtools/python/python3/create_manifest3.py @@ -310,7 +310,13 @@ for pypkg in old_manifest: pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}') inFolders = False for folder in allfolders: -if folder in pymodule_dep: +# The module could have a directory named after it, e.g. xml, if we take out the filename from the path +# we'll end up with ${libdir}, and we want ${libdir}/xml +if isFolder(pymodule_dep): +check_path = pymodule_dep +else: +check_path = os.path.dirname(pymodule_dep) +if folder in check_path : inFolders = True # Did we find a folder? folderFound = False # Second flag to break inner for # Loop only through packages which contain folders -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/2] mdadm: Drop redundant patches and fix build with clang
On Sat, Dec 8, 2018 at 3:15 AM Richard Purdie wrote: > > On Sat, 2018-12-08 at 02:26 -0800, Khem Raj wrote: > > Several patches were being applied unnecessarily, the purpose they > > served at one point has either been fixed differently, or accepted > > upstream. > > > > Add a new patch to make clang's diagnostics happy > > > > Signed-off-by: Khem Raj > > Sorry, it doesn't build: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/71/builds/45/steps/7/logs/step1b > > (and several other errors) I could see the same failure on my mips builder. We still need to keep the ptest patch. I sent a v2 just now. > > Cheers, > > Richard > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V2] mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they served at one point has either been fixed differently, or accepted upstream. Add a new patch to make clang's diagnostics happy Signed-off-by: Khem Raj --- V2: Keep mdadm-fix-ptest-build-errors.patch ...abs-diff-in-a-standard-compliant-way.patch | 31 .../files/0001-Disable-gcc8-warnings.patch| 152 -- ...smacros.h-for-major-minor-defintions.patch | 44 - ...h-Undefine-dprintf-before-redefining.patch | 39 - ...omment-to-indicate-valid-fallthrough.patch | 124 -- .../mdadm/files/gcc-4.9.patch | 31 meta/recipes-extended/mdadm/mdadm_4.1.bb | 19 +-- 7 files changed, 39 insertions(+), 401 deletions(-) create mode 100644 meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch delete mode 100644 meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch delete mode 100644 meta/recipes-extended/mdadm/files/gcc-4.9.patch diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch new file mode 100644 index 00..803a59b3ec --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch @@ -0,0 +1,31 @@ +From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Dec 2018 17:22:39 -0800 +Subject: [PATCH] Compute abs diff in a standard compliant way + +This make it a bit less implementation defined and silences clang +warning -Wabsolute-value + +| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi +gned long long' has no effect [-Werror,-Wabsolute-value] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + super-intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super-intel.c b/super-intel.c +index 6438987..10d7218 100644 +--- a/super-intel.c b/super-intel.c +@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map, +* 2048 blocks per each device. If the difference is higher it means +* that array size was expanded and num_data_stripes was not updated. +*/ +- if ((unsigned int)abs(calc_dev_size - dev_size) > ++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) > + (1 << SECT_PER_MB_SHIFT) * member_disks) { + component_size = dev_size / member_disks; + dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n", 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..00 --- a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch +++ /dev/null @@ -1,152 +0,0 @@ -From a6c991750ae6ebd87a0b9b243bec7fd8e5a064c5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 9 May 2018 12:56:41 -0700 -Subject: [PATCH] Disable gcc8 warnings - -This is needed until -https://bugzilla.redhat.com/show_bug.cgi?id=1553958 - -Fix super0.c issue which is triggered only in DEBUG_BUILD with -O1 (or any -configuration without -ftree-vrp or with -fno-tree-vrp) - -super0.c: In function 'examine_super0': -super0.c:238:32: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] - snprintf(nb, sizeof(nb), "%4d", d); -^ - -Upstream-Status: Inappropriate [Workaround] - -Signed-off-by: Khem Raj - - Monitor.c | 4 +++- - mdopen.c | 4 - super-ddf.c | 4 - super-intel.c | 6 ++ - super0.c | 2 +- - super1.c | 5 + - 6 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/Monitor.c b/Monitor.c -index 036103f..08cbd0a 100644 a/Monitor.c -+++ b/Monitor.c -@@ -445,7 +445,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) - event, dev); - } - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-truncation" - static int check_array(struct state *st, struct mdstat_ent *mdstat, - int test, struct alert_info *ainfo, - int increments, char *prefer) -@@ -673,6 +674,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, - st->err++; - goto out; - } -+#pragma GCC diagnostic pop - - static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist, -
Re: [OE-core] [PATCH 1/2] mdadm: Drop redundant patches and fix build with clang
On Sat, 2018-12-08 at 02:26 -0800, Khem Raj wrote: > Several patches were being applied unnecessarily, the purpose they > served at one point has either been fixed differently, or accepted > upstream. > > Add a new patch to make clang's diagnostics happy > > Signed-off-by: Khem Raj Sorry, it doesn't build: https://autobuilder.yoctoproject.org/typhoon/#/builders/71/builds/45/steps/7/logs/step1b (and several other errors) Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] nfs-utils: Fix build with clang
Signed-off-by: Khem Raj --- .../nfs-utils/clang-format-string.patch | 183 ++ .../nfs-utils/nfs-utils_2.3.3.bb | 2 +- 2 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch new file mode 100644 index 00..1d693e4142 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-format-string.patch @@ -0,0 +1,183 @@ +Clang comes up with more printf format warnings +Correcting “format string is not a string literal” warning +requires us to declare that parameter is a printf style +format using the attribute flag + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: nfs-utils-2.3.3/support/include/xcommon.h +=== +--- nfs-utils-2.3.3.orig/support/include/xcommon.h nfs-utils-2.3.3/support/include/xcommon.h +@@ -27,7 +27,7 @@ + + /* Functions in sundries.c that are used in mount.c and umount.c */ + char *canonicalize (const char *path); +-void nfs_error (const char *fmt, ...); ++void nfs_error (const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); + void *xmalloc (size_t size); + void *xrealloc(void *p, size_t size); + void xfree(void *); +@@ -36,9 +36,9 @@ char *xstrndup (const char *s, int n); + char *xstrconcat2 (const char *, const char *); + char *xstrconcat3 (const char *, const char *, const char *); + char *xstrconcat4 (const char *, const char *, const char *, const char *); +-void die (int errcode, const char *fmt, ...); ++void die (int errcode, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3))); + +-extern void die(int err, const char *fmt, ...); ++extern void die(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3))); + extern void (*at_die)(void); + + /* exit status - bits below are ORed */ +Index: nfs-utils-2.3.3/support/include/xlog.h +=== +--- nfs-utils-2.3.3.orig/support/include/xlog.h nfs-utils-2.3.3/support/include/xlog.h +@@ -43,10 +43,10 @@ void xlog_config(int fac, int on); + void xlog_sconfig(char *, int on); + void xlog_from_conffile(char *); + int xlog_enabled(int fac); +-void xlog(int fac, const char *fmt, ...); +-void xlog_warn(const char *fmt, ...); +-void xlog_err(const char *fmt, ...); +-void xlog_errno(int err, const char *fmt, ...); +-void xlog_backend(int fac, const char *fmt, va_list args); ++void xlog(int fac, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3))); ++void xlog_warn(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); ++void xlog_err(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); ++void xlog_errno(int err, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3))); ++void xlog_backend(int fac, const char *fmt, va_list args) __attribute__((__format__ (__printf__, 2, 0))); + + #endif /* XLOG_H */ +Index: nfs-utils-2.3.3/support/nfs/xcommon.c +=== +--- nfs-utils-2.3.3.orig/support/nfs/xcommon.c nfs-utils-2.3.3/support/nfs/xcommon.c +@@ -93,7 +93,10 @@ nfs_error (const char *fmt, ...) { + + fmt2 = xstrconcat2 (fmt, "\n"); + va_start (args, fmt); ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wformat-nonliteral" + vfprintf (stderr, fmt2, args); ++#pragma clang diagnostic pop + va_end (args); + free (fmt2); + } +Index: nfs-utils-2.3.3/utils/exportfs/exportfs.c +=== +--- nfs-utils-2.3.3.orig/utils/exportfs/exportfs.c nfs-utils-2.3.3/utils/exportfs/exportfs.c +@@ -644,6 +644,7 @@ out: + return result; + } + ++__attribute__((__format__ (__printf__, 2, 3))) + static char + dumpopt(char c, char *fmt, ...) + { +Index: nfs-utils-2.3.3/utils/statd/statd.c +=== +--- nfs-utils-2.3.3.orig/utils/statd/statd.c nfs-utils-2.3.3/utils/statd/statd.c +@@ -136,7 +136,7 @@ static void log_modes(void) + strcat(buf, "TI-RPC "); + #endif + +- xlog_warn(buf); ++ xlog_warn("%s", buf); + } + + /* +Index: nfs-utils-2.3.3/support/nfs/svc_create.c +=== +--- nfs-utils-2.3.3.orig/support/nfs/svc_create.c nfs-utils-2.3.3/support/nfs/svc_create.c +@@ -184,7 +184,7 @@ svc_create_sock(const struct sockaddr *s + type =
[OE-core] [PATCH 1/2] mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they served at one point has either been fixed differently, or accepted upstream. Add a new patch to make clang's diagnostics happy Signed-off-by: Khem Raj --- ...abs-diff-in-a-standard-compliant-way.patch | 31 .../files/0001-Disable-gcc8-warnings.patch| 152 -- ...smacros.h-for-major-minor-defintions.patch | 44 - ...h-Undefine-dprintf-before-redefining.patch | 39 - ...omment-to-indicate-valid-fallthrough.patch | 124 -- .../mdadm/files/gcc-4.9.patch | 31 .../files/mdadm-fix-ptest-build-errors.patch | 43 - meta/recipes-extended/mdadm/mdadm_4.1.bb | 20 +-- 8 files changed, 39 insertions(+), 445 deletions(-) create mode 100644 meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch delete mode 100644 meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch delete mode 100644 meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch delete mode 100644 meta/recipes-extended/mdadm/files/gcc-4.9.patch delete mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch new file mode 100644 index 00..803a59b3ec --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch @@ -0,0 +1,31 @@ +From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Dec 2018 17:22:39 -0800 +Subject: [PATCH] Compute abs diff in a standard compliant way + +This make it a bit less implementation defined and silences clang +warning -Wabsolute-value + +| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi +gned long long' has no effect [-Werror,-Wabsolute-value] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + super-intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super-intel.c b/super-intel.c +index 6438987..10d7218 100644 +--- a/super-intel.c b/super-intel.c +@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map, +* 2048 blocks per each device. If the difference is higher it means +* that array size was expanded and num_data_stripes was not updated. +*/ +- if ((unsigned int)abs(calc_dev_size - dev_size) > ++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) > + (1 << SECT_PER_MB_SHIFT) * member_disks) { + component_size = dev_size / member_disks; + dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n", 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..00 --- a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch +++ /dev/null @@ -1,152 +0,0 @@ -From a6c991750ae6ebd87a0b9b243bec7fd8e5a064c5 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 9 May 2018 12:56:41 -0700 -Subject: [PATCH] Disable gcc8 warnings - -This is needed until -https://bugzilla.redhat.com/show_bug.cgi?id=1553958 - -Fix super0.c issue which is triggered only in DEBUG_BUILD with -O1 (or any -configuration without -ftree-vrp or with -fno-tree-vrp) - -super0.c: In function 'examine_super0': -super0.c:238:32: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] - snprintf(nb, sizeof(nb), "%4d", d); -^ - -Upstream-Status: Inappropriate [Workaround] - -Signed-off-by: Khem Raj - - Monitor.c | 4 +++- - mdopen.c | 4 - super-ddf.c | 4 - super-intel.c | 6 ++ - super0.c | 2 +- - super1.c | 5 + - 6 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/Monitor.c b/Monitor.c -index 036103f..08cbd0a 100644 a/Monitor.c -+++ b/Monitor.c -@@ -445,7 +445,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) - event, dev); - } - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-truncation" - static int check_array(struct state *st, struct mdstat_ent *mdstat, - int test, struct alert_info *ainfo, - int increments, char *prefer) -@@ -673,6 +674,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, - st->err++; - goto out; - } -+#pragma