All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mdadm: Fix building errors
@ 2021-06-22 15:15 Xiao Ni
  2021-07-16 14:27 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Ni @ 2021-06-22 15:15 UTC (permalink / raw)
  To: jes; +Cc: linux-raid, ncroxon

In util.c, there is a building error:
'/md/metadata_version' directive writing 20 bytes into a
region of size between 0 and 255 [-Werror=format-overflow=]

In mapfile.c
It declares the fouth argument as 'int *' in map_update,
but in mdadm.h it's previously declared as an array 'int[4]'

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 mapfile.c | 2 +-
 util.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mapfile.c b/mapfile.c
index 8d7acb3..6b2207d 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -215,7 +215,7 @@ void map_free(struct map_ent *map)
 }
 
 int map_update(struct map_ent **mpp, char *devnm, char *metadata,
-	       int *uuid, char *path)
+	       int uuid[4], char *path)
 {
 	struct map_ent *map, *mp;
 	int rv;
diff --git a/util.c b/util.c
index 5879694..cdf1da2 100644
--- a/util.c
+++ b/util.c
@@ -1543,7 +1543,7 @@ int open_container(int fd)
 	/* 'fd' is a block device.  Find out if it is in use
 	 * by a container, and return an open fd on that container.
 	 */
-	char path[256];
+	char path[288];
 	char *e;
 	DIR *dir;
 	struct dirent *de;
-- 
2.7.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] mdadm: Fix building errors
  2021-06-22 15:15 [PATCH 1/1] mdadm: Fix building errors Xiao Ni
@ 2021-07-16 14:27 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2021-07-16 14:27 UTC (permalink / raw)
  To: Xiao Ni; +Cc: linux-raid, ncroxon

On 6/22/21 11:15 AM, Xiao Ni wrote:
> In util.c, there is a building error:
> '/md/metadata_version' directive writing 20 bytes into a
> region of size between 0 and 255 [-Werror=format-overflow=]
> 
> In mapfile.c
> It declares the fouth argument as 'int *' in map_update,
> but in mdadm.h it's previously declared as an array 'int[4]'
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
>  mapfile.c | 2 +-
>  util.c    | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied!

Thanks,
Jes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-16 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 15:15 [PATCH 1/1] mdadm: Fix building errors Xiao Ni
2021-07-16 14:27 ` Jes Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.