From be054588b43a222a128840011259b5f8e6c8a2cd Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 7 Sep 2017 15:31:00 +0200 Subject: [PATCH] bgpd: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit bgp_route.c:6393:7: error: ‘len’ may be used uninitialized in this function gcc 5.4.0 isn't intelligent enough to notice it's set on all paths. Signed-off-by: David Lamparter --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index f354071654..fabe4483e5 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6339,7 +6339,7 @@ void bgp_redistribute_withdraw(struct bgp *bgp, afi_t afi, int type, static void route_vty_out_route(struct prefix *p, struct vty *vty, json_object *json) { - int len; + int len = 0; u_int32_t destination; char buf[BUFSIZ]; -- 2.39.5