From: Il Han <corone.il.han@gmail.com>
To: linux-mm@kvack.org
Cc: Il Han <corone.il.han@gmail.com>
Subject: [PATCH] swapfile.c: Initialize a variable.
Date: Thu, 6 Oct 2011 13:41:14 +0900 [thread overview]
Message-ID: <1317876074-25417-1-git-send-email-corone.il.han@gmail.com> (raw)
Initialize the variable to remove the following warning.
mm/swapfile.c:2028: warning: 'span' may be used uninitialized in this function
Initialize it.
Signed-off-by: Il Han <corone.il.han@gmail.com>
---
mm/swapfile.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 17bc224..d5ca685 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2016,7 +2016,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
int error;
union swap_header *swap_header;
int nr_extents;
- sector_t span;
+ sector_t span = 0;
unsigned long maxpages;
unsigned char *swap_map = NULL;
struct page *page = NULL;
--
1.7.4.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-10-06 4:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 4:41 Il Han [this message]
2011-10-24 15:06 ` [PATCH] swapfile.c: Initialize a variable Michal Hocko
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=1317876074-25417-1-git-send-email-corone.il.han@gmail.com \
--to=corone.il.han@gmail.com \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.