lkml.org 
[lkml]   [2009]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] mm/sparse.c: fix build warning
Date
From
Fix warning due to uninitialized variable.

mm/sparse.c: In function '__section_nr':
mm/sparse.c:132: warning: 'root' is used uninitialized in this function

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/mm/sparse.c b/mm/sparse.c
index 083f5b6..5657e92 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -117,7 +117,7 @@ static inline int sparse_index_init(unsigned long
section_nr, int nid)
int __section_nr(struct mem_section* ms)
{
unsigned long root_nr;
- struct mem_section* root;
+ struct mem_section *uninitialized_var(root);

for (root_nr = 0; root_nr < NR_SECTION_ROOTS; root_nr++) {
root = __nr_to_section(root_nr * SECTIONS_PER_ROOT);

\
 
 \ /
  Last update: 2009-03-28 00:55    [W:0.027 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site