[PATCH 7/7] libmultipath: fix warning with clang 3.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxxx>

Fixes the following warning with clang 3.5:

io_err_stat.c:613:31: error: missing field 'slot' initializer
[-Werror,-Wmissing-field-initializers]
        struct _vector _pathvec = {0,};

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 libmultipath/io_err_stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
index abdd0b4..d8d91f6 100644
--- a/libmultipath/io_err_stat.c
+++ b/libmultipath/io_err_stat.c
@@ -610,7 +610,7 @@ static void process_async_ios_event(int timeout_nsecs, char *dev)
 
 static void service_paths(void)
 {
-	struct _vector _pathvec = {0};
+	struct _vector _pathvec = { .allocated = 0 };
 	/* avoid gcc warnings that &_pathvec will never be NULL in vector ops */
 	struct _vector * const tmp_pathvec = &_pathvec;
 	struct io_err_stat_path *pp;
-- 
2.30.1


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux