summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorZhilong Liu <zlliu@suse.com>2017-04-10 06:49:52 +0200
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-04-11 17:27:53 +0200
commit5fbc1f1527ec86ae904739a27c0af4e3bc89084e (patch)
tree7b23da596595c257348923830e5d9d570d893108 /mdadm.c
parentmdadm: Fail for kernels older than 2.6.15 (diff)
downloadmdadm-5fbc1f1527ec86ae904739a27c0af4e3bc89084e.tar.xz
mdadm-5fbc1f1527ec86ae904739a27c0af4e3bc89084e.zip
mdadm.c:fix compile warning "mdfd is uninitialized"
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>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index 001ff684..41dae1db 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1916,7 +1916,7 @@ static int misc_list(struct mddev_dev *devlist,
int rv = 0;
for (dv = devlist; dv; dv = (rv & 16) ? NULL : dv->next) {
- int mdfd;
+ int mdfd = -1;
switch(dv->disposition) {
case 'D':