From: Zhilong Liu <zlliu@suse.com>
To: Jes.Sorensen@gmail.com
Cc: linux-raid@vger.kernel.org, Zhilong Liu <zlliu@suse.com>
Subject: [PATCH] mdadm.c:fix compile warning "mdfd is uninitialized"
Date: Mon, 10 Apr 2017 12:49:52 +0800 [thread overview]
Message-ID: <1491799792-6974-1-git-send-email-zlliu@suse.com> (raw)
In-Reply-To: <016b495a-1361-0f29-0fcb-6af008625565@gmail.com>
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>
---
mdadm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mdadm.c b/mdadm.c
index 001ff68..41dae1d 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':
--
2.6.6
next prev parent reply other threads:[~2017-04-10 4:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 5:31 mdadm:compiled warning in mdadm.c:1974:29 treats as errors Zhilong
2017-04-05 15:37 ` jes.sorensen
2017-04-06 8:21 ` Liu Zhilong
2017-04-06 19:10 ` Jes Sorensen
2017-04-06 23:36 ` NeilBrown
2017-04-07 3:53 ` Liuzhilong
2017-04-07 14:53 ` Jes Sorensen
2017-04-10 4:49 ` Zhilong Liu [this message]
2017-04-11 15:28 ` [PATCH] mdadm.c:fix compile warning "mdfd is uninitialized" Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491799792-6974-1-git-send-email-zlliu@suse.com \
--to=zlliu@suse.com \
--cc=Jes.Sorensen@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).