Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit aed390db25c837c3002925a468b4d32d9a2b3ecb Author: Simon Wunderlich simon@open-mesh.com Date: Fri Nov 22 13:30:25 2013 +0100
batman-adv: silence uninitialized variable warning
sparse (at least the version of the build checker) is complaining about:
routing.c: In function 'batadv_find_router': routing.c:431:28: warning: 'next_candidate_router' may be used uninitialized in this function [-Wmaybe-uninitialized]
Although this is bogus, silencing is not expensive and is done by this patch.
Introduced by 797edd9e87ac838711e03498a4ae795b600191af ("batman-adv: add bonding again")
Signed-off-by: Simon Wunderlich simon@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
aed390db25c837c3002925a468b4d32d9a2b3ecb routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/routing.c b/routing.c index 69620e0..23311f5 100644 --- a/routing.c +++ b/routing.c @@ -428,7 +428,7 @@ batadv_find_router(struct batadv_priv *bat_priv, { struct batadv_algo_ops *bao = bat_priv->bat_algo_ops; struct batadv_neigh_node *first_candidate_router = NULL; - struct batadv_neigh_node *next_candidate_router; + struct batadv_neigh_node *next_candidate_router = NULL; struct batadv_neigh_node *router, *cand_router = NULL; struct batadv_orig_ifinfo *cand, *first_candidate = NULL; struct batadv_orig_ifinfo *next_candidate = NULL;