[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1355220996-32753-1-git-send-email-dinggnu@gmail.com>
Date: Tue, 11 Dec 2012 10:16:31 +0000
From: Cong Ding <dinggnu@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Michel Lespinasse <walken@...gle.com>,
Rik van Riel <riel@...hat.com>,
Akinobu Mita <akinobu.mita@...il.com>,
David Woodhouse <David.Woodhouse@...el.com>,
linux-kernel@...r.kernel.org
Cc: Cong Ding <dinggnu@...il.com>
Subject: [PATCH] lib/rbtree_test.c: fix uninitialized variable warning
this patch is to fix the following compilation warning:
lib/rbtree_test.c: In function ‘check’:
lib/rbtree_test.c:121: warning: ‘blacks’ may be used uninitialized in this
function
the use of variable blacks in line 133 might be uninitialized
Signed-off-by: Cong Ding <dinggnu@...il.com>
---
lib/rbtree_test.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c
index da96578..af38aed 100644
--- a/lib/rbtree_test.c
+++ b/lib/rbtree_test.c
@@ -118,7 +118,7 @@ static void check(int nr_nodes)
{
struct rb_node *rb;
int count = 0;
- int blacks;
+ int blacks = 0;
u32 prev_key = 0;
for (rb = rb_first(&root); rb; rb = rb_next(rb)) {
--
1.7.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists