[PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formattingin previous email)

From: askb
Date: Wed Nov 04 2009 - 01:45:27 EST

Found the compiler warning on linux-next:

mm/ksm.c: In function âksm_scan_threadâ:
mm/ksm.c:1083: warning: âpage2[0u]â may be used uninitialized in this
mm/ksm.c:1083: note: âpage2[0u]â was declared here

fix for the above warning:

Signed-off-by: Anil SB <askb23@xxxxxxxxx>

diff --git a/mm/ksm.c b/mm/ksm.c
index bef1af4..2ea0fd3 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1080,7 +1080,7 @@ static void stable_tree_append(struct rmap_item *rmap_item,
static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
- struct page *page2[1];
+ struct page *page2[1] = {NULL};
struct rmap_item *tree_rmap_item;
unsigned int checksum;
int err;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/