diff options
author | Zhilong Liu <zlliu@suse.com> | 2017-04-10 06:49:52 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-04-11 17:27:53 +0200 |
commit | 5fbc1f1527ec86ae904739a27c0af4e3bc89084e (patch) | |
tree | 7b23da596595c257348923830e5d9d570d893108 /mdadm.c | |
parent | mdadm: Fail for kernels older than 2.6.15 (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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': |