From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning
Date: Fri, 22 Nov 2013 13:30:25 +0100 [thread overview]
Message-ID: <1385123427-15460-2-git-send-email-sw@simonwunderlich.de> (raw)
In-Reply-To: <1385123427-15460-1-git-send-email-sw@simonwunderlich.de>
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;
--
1.7.10.4
next prev parent reply other threads:[~2013-11-22 12:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
2013-11-22 12:30 ` Simon Wunderlich [this message]
2013-11-22 17:28 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Marek Lindner
2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit Simon Wunderlich
2013-11-22 17:29 ` Marek Lindner
2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif Simon Wunderlich
2013-11-22 17:30 ` Marek Lindner
2013-11-22 17:27 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385123427-15460-2-git-send-email-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=simon@open-mesh.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox