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>
This commit is contained in:
Zhilong Liu 2017-04-10 12:49:52 +08:00 committed by Jes Sorensen
parent dcf3d4de95
commit 5fbc1f1527
1 changed files with 1 additions and 1 deletions

View File

@ -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':