From 918854a65e856574523d94763ef2a2b48ad55a25 Mon Sep 17 00:00:00 2001 From: Cong Ding Date: Mon, 17 Dec 2012 16:01:43 -0800 Subject: [PATCH] lib/rbtree_test.c: fix uninitialized variable warning Fix this warning: lib/rbtree_test.c: In function `check': lib/rbtree_test.c:121: warning: `blacks' may be used uninitialized in this function Signed-off-by: Cong Ding Cc: Michel Lespinasse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/rbtree_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 268b23951fec..d7f491a54579 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)) { -- 2.20.1