lib/rbtree_test.c: fix uninitialized variable warning
PATCH 1/1 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 <[email protected]>
--- lib/rbtree_test.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/rbtree_test.c +1 -1
@@ -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)) {
Signature · 1 line
1.7.4.5