File 0041-mdadm.c-fix-compile-warning-mdfd-is-uninitialized.patch of Package mdadm.14070

From 5fbc1f1527ec86ae904739a27c0af4e3bc89084e Mon Sep 17 00:00:00 2001
From: Zhilong Liu <zlliu@suse.com>
Date: Mon, 10 Apr 2017 12:49:52 +0800
Subject: [PATCH] mdadm.c:fix compile warning "mdfd is uninitialized"
Git-commit: 5fbc1f1527ec86ae904739a27c0af4e3bc89084e
Patch-mainline: mdadm-4.0+
References: bsc#1069165, bsc#1069167, bsc#1068030

Initialized the mdfd as -1 to prevent compile error
of some compilers.
For example, gcc version 4.8.5(SUSE Linux).

Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Signed-off-by: Coly Li <colyli@suse.de>

---
 mdadm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: mdadm/mdadm.c
===================================================================
--- mdadm.orig/mdadm.c
+++ mdadm/mdadm.c
@@ -1908,7 +1908,7 @@ static int misc_list(struct mddev_dev *d
 	int rv = 0;
 
 	for (dv = devlist; dv; dv = (rv & 16) ? NULL : dv->next) {
-		int mdfd;
+		int mdfd = -1;
 
 		switch(dv->disposition) {
 		case 'D':
openSUSE Build Service is sponsored by