From 399de5c15c7b2db0f5f877759b4010dee8808010 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Mon, 15 Apr 2024 16:13:20 +0800 Subject: [PATCH] bgpd: fix compile error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is happening when configuring with `--disable-bgp-vnc`: ``` ./bgpd/bgp_route.c:3342:23: error: unused variable ‘p’ [-Werror=unused-variable] 3342 | const struct prefix *p = bgp_dest_get_prefix(dest); ``` Signed-off-by: anlan_cs --- bgpd/bgp_route.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 97883418ef..0a865d7098 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3339,7 +3339,9 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest, return; } +#ifdef ENABLE_BGP_VNC const struct prefix *p = bgp_dest_get_prefix(dest); +#endif debug = bgp_debug_bestpath(dest); if (debug) -- 2.39.5