From 273ff9b5ccc438e3099809c43229cc75503cff68 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 25 Jul 2016 14:15:01 -0700 Subject: [PATCH] Fix uninitialized variable in avl_add() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silence the following warning when compiling with gcc 5.4.0. Specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609. module/avl/avl.c: In function ‘avl_add’: module/avl/avl.c:647:2: warning: ‘where’ may be used uninitialized in this function [-Wmaybe-uninitialized] avl_insert(tree, new_node, where); Signed-off-by: Brian Behlendorf --- module/avl/avl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/avl/avl.c b/module/avl/avl.c index abf74bf72..86183fea0 100644 --- a/module/avl/avl.c +++ b/module/avl/avl.c @@ -630,7 +630,7 @@ avl_insert_here( void avl_add(avl_tree_t *tree, void *new_node) { - avl_index_t where; + avl_index_t where = 0; /* * This is unfortunate. We want to call panic() here, even for