From: Simon Wunderlich simon@open-mesh.com
This problem was introduced by commit 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Simon Wunderlich simon@open-mesh.com --- main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main.h b/main.h index 09cdebb..d154d4d 100644 --- a/main.h +++ b/main.h @@ -71,7 +71,8 @@
/* default interface for multi interface operation. The default interface is * used for communication which originated locally (i.e. is not forwarded) - * or where special forwarding is not desired/necessary. */ + * or where special forwarding is not desired/necessary. + */ #define BATADV_IF_DEFAULT ((struct batadv_hard_iface *)NULL)
#define BATADV_NUM_WORDS BITS_TO_LONGS(BATADV_TQ_LOCAL_WINDOW_SIZE)
From: Simon Wunderlich simon@open-mesh.com
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 --- 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;
On Friday 22 November 2013 13:30:25 Simon Wunderlich wrote:
From: Simon Wunderlich simon@open-mesh.com
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
routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied in revision aed390d.
Thanks, Marek
From: Simon Wunderlich simon@open-mesh.com
The directlink variable is not needed anymore, and sparse complains about that. Remove it.
Removal was introduced in 29b9256e6631876d4f1719f4d5e13d7ee140c61b ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Simon Wunderlich simon@open-mesh.com --- bat_iv_ogm.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index dbd55f0..2a36de8 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -467,12 +467,10 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet) struct batadv_priv *bat_priv; struct batadv_hard_iface *primary_if = NULL; struct batadv_ogm_packet *batadv_ogm_packet; - unsigned char directlink; uint8_t *packet_pos;
packet_pos = forw_packet->skb->data; batadv_ogm_packet = (struct batadv_ogm_packet *)packet_pos; - directlink = (batadv_ogm_packet->flags & BATADV_DIRECTLINK ? 1 : 0);
if (!forw_packet->if_incoming) { pr_err("Error - can't forward packet: incoming iface not specified\n");
On Friday 22 November 2013 13:30:26 Simon Wunderlich wrote:
From: Simon Wunderlich simon@open-mesh.com
The directlink variable is not needed anymore, and sparse complains about that. Remove it.
Removal was introduced in 29b9256e6631876d4f1719f4d5e13d7ee140c61b ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Simon Wunderlich simon@open-mesh.com
bat_iv_ogm.c | 2 -- 1 file changed, 2 deletions(-)
Applied in revision a0fc2f1.
Thanks, Marek
From: Simon Wunderlich simon@open-mesh.com
The orig_node_tmp variable is not needed anymore, and spare complains about that. Remove it.
This variable was used for line length reasons and usage was removed in de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com --- bat_iv_ogm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index 2a36de8..939d16e 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -1368,7 +1368,7 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset, { struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface); struct batadv_neigh_node *router = NULL, *router_router = NULL; - struct batadv_orig_node *orig_neigh_node, *orig_node_tmp; + struct batadv_orig_node *orig_neigh_node; struct batadv_orig_ifinfo *orig_ifinfo; struct batadv_neigh_node *orig_neigh_router = NULL; struct batadv_neigh_ifinfo *router_ifinfo = NULL; @@ -1412,7 +1412,6 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
router = batadv_orig_router_get(orig_node, if_outgoing); if (router) { - orig_node_tmp = router->orig_node; router_router = batadv_orig_router_get(router->orig_node, if_outgoing); router_ifinfo = batadv_neigh_ifinfo_get(router, if_outgoing);
On Friday 22 November 2013 13:30:27 Simon Wunderlich wrote:
From: Simon Wunderlich simon@open-mesh.com
The orig_node_tmp variable is not needed anymore, and spare complains about that. Remove it.
This variable was used for line length reasons and usage was removed in de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com
bat_iv_ogm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied in revision 930c3b9.
Thanks, Marek
On Friday 22 November 2013 13:30:24 Simon Wunderlich wrote:
From: Simon Wunderlich simon@open-mesh.com
This problem was introduced by commit 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Simon Wunderlich simon@open-mesh.com
main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied in revision 4812dfd.
Thanks, Marek
b.a.t.m.a.n@lists.open-mesh.org