]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix compile error 15743/head
authoranlan_cs <anlan_cs@tom.com>
Mon, 15 Apr 2024 08:13:20 +0000 (16:13 +0800)
committeranlan_cs <anlan_cs@tom.com>
Mon, 15 Apr 2024 08:15:33 +0000 (16:15 +0800)
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 <anlan_cs@tom.com>
bgpd/bgp_route.c

index 97883418ef114be1d154ede7ede9ddac7a59b06c..0a865d70983694a2c36409359959f281c2b28e10 100644 (file)
@@ -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)