From patchwork Fri Nov 22 12:30:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 3672 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=79.140.42.25; helo=mail.mail.packetmixer.de; envelope-from=sw@simonwunderlich.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mail.mail.packetmixer.de (packetmixer.de [79.140.42.25]) by open-mesh.org (Postfix) with ESMTPS id 54B0B601FCA for ; Fri, 22 Nov 2013 13:30:35 +0100 (CET) Received: from kero.packetmixer.de (drsd-4d05ee8b.pool.mediaWays.net [77.5.238.139]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id E040362402; Fri, 22 Nov 2013 12:42:36 +0000 (UTC) From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 22 Nov 2013 13:30:25 +0100 Message-Id: <1385123427-15460-2-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1385123427-15460-1-git-send-email-sw@simonwunderlich.de> References: <1385123427-15460-1-git-send-email-sw@simonwunderlich.de> Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2013 12:30:35 -0000 From: Simon Wunderlich 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 --- 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;