[PATCH] swapfile.c: Initialize a variable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]