mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 21:20:48 +00:00
bgpd: Remove set but unused variables
Found by clang 15. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
328b64fcb5
commit
2cc428bee2
@ -127,7 +127,6 @@ void rfapiCheckRouteCount(void)
|
|||||||
struct agg_node *rn;
|
struct agg_node *rn;
|
||||||
|
|
||||||
int holddown_count = 0;
|
int holddown_count = 0;
|
||||||
int local_count = 0;
|
|
||||||
int imported_count = 0;
|
int imported_count = 0;
|
||||||
int remote_count = 0;
|
int remote_count = 0;
|
||||||
|
|
||||||
@ -146,9 +145,7 @@ void rfapiCheckRouteCount(void)
|
|||||||
++holddown_count;
|
++holddown_count;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (RFAPI_LOCAL_BI(bpi)) {
|
if (!RFAPI_LOCAL_BI(bpi)) {
|
||||||
++local_count;
|
|
||||||
} else {
|
|
||||||
if (RFAPI_DIRECT_IMPORT_BI(
|
if (RFAPI_DIRECT_IMPORT_BI(
|
||||||
bpi)) {
|
bpi)) {
|
||||||
++imported_count;
|
++imported_count;
|
||||||
|
@ -116,7 +116,6 @@ void rfapiRibCheckCounts(
|
|||||||
struct bgp *bgp = bgp_get_default();
|
struct bgp *bgp = bgp_get_default();
|
||||||
|
|
||||||
uint32_t t_pfx_active = 0;
|
uint32_t t_pfx_active = 0;
|
||||||
uint32_t t_pfx_deleted = 0;
|
|
||||||
|
|
||||||
uint32_t t_ri_active = 0;
|
uint32_t t_ri_active = 0;
|
||||||
uint32_t t_ri_deleted = 0;
|
uint32_t t_ri_deleted = 0;
|
||||||
@ -131,7 +130,6 @@ void rfapiRibCheckCounts(
|
|||||||
|
|
||||||
afi_t afi;
|
afi_t afi;
|
||||||
uint32_t pfx_active = 0;
|
uint32_t pfx_active = 0;
|
||||||
uint32_t pfx_deleted = 0;
|
|
||||||
|
|
||||||
for (afi = AFI_IP; afi < AFI_MAX; ++afi) {
|
for (afi = AFI_IP; afi < AFI_MAX; ++afi) {
|
||||||
|
|
||||||
@ -156,8 +154,6 @@ void rfapiRibCheckCounts(
|
|||||||
if (dsl) {
|
if (dsl) {
|
||||||
ri_deleted = skiplist_count(dsl);
|
ri_deleted = skiplist_count(dsl);
|
||||||
t_ri_deleted += ri_deleted;
|
t_ri_deleted += ri_deleted;
|
||||||
++pfx_deleted;
|
|
||||||
++t_pfx_deleted;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (rn = agg_route_top(rfd->rib_pending[afi]); rn;
|
for (rn = agg_route_top(rfd->rib_pending[afi]); rn;
|
||||||
@ -2303,10 +2299,6 @@ void rfapiRibShowResponses(void *stream, struct prefix *pfx_match,
|
|||||||
int printedheader = 0;
|
int printedheader = 0;
|
||||||
int routes_total = 0;
|
int routes_total = 0;
|
||||||
int nhs_total = 0;
|
int nhs_total = 0;
|
||||||
int prefixes_total = 0;
|
|
||||||
int prefixes_displayed = 0;
|
|
||||||
int nves_total = 0;
|
|
||||||
int nves_with_routes = 0;
|
|
||||||
int nves_displayed = 0;
|
int nves_displayed = 0;
|
||||||
int routes_displayed = 0;
|
int routes_displayed = 0;
|
||||||
int nhs_displayed = 0;
|
int nhs_displayed = 0;
|
||||||
@ -2326,10 +2318,6 @@ void rfapiRibShowResponses(void *stream, struct prefix *pfx_match,
|
|||||||
int printednve = 0;
|
int printednve = 0;
|
||||||
afi_t afi;
|
afi_t afi;
|
||||||
|
|
||||||
++nves_total;
|
|
||||||
if (rfd->rib_prefix_count)
|
|
||||||
++nves_with_routes;
|
|
||||||
|
|
||||||
for (afi = AFI_IP; afi < AFI_MAX; ++afi) {
|
for (afi = AFI_IP; afi < AFI_MAX; ++afi) {
|
||||||
|
|
||||||
struct agg_node *rn;
|
struct agg_node *rn;
|
||||||
@ -2355,14 +2343,11 @@ void rfapiRibShowResponses(void *stream, struct prefix *pfx_match,
|
|||||||
|
|
||||||
routes_total++;
|
routes_total++;
|
||||||
nhs_total += skiplist_count(sl);
|
nhs_total += skiplist_count(sl);
|
||||||
++prefixes_total;
|
|
||||||
|
|
||||||
if (pfx_match && !prefix_match(pfx_match, p)
|
if (pfx_match && !prefix_match(pfx_match, p)
|
||||||
&& !prefix_match(p, pfx_match))
|
&& !prefix_match(p, pfx_match))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
++prefixes_displayed;
|
|
||||||
|
|
||||||
if (!printedheader) {
|
if (!printedheader) {
|
||||||
++printedheader;
|
++printedheader;
|
||||||
|
|
||||||
|
@ -822,11 +822,6 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)
|
|||||||
const char *vty_newline;
|
const char *vty_newline;
|
||||||
|
|
||||||
int printedheader = 0;
|
int printedheader = 0;
|
||||||
|
|
||||||
int nves_total = 0;
|
|
||||||
int nves_with_queries = 0;
|
|
||||||
int nves_displayed = 0;
|
|
||||||
|
|
||||||
int queries_total = 0;
|
int queries_total = 0;
|
||||||
int queries_displayed = 0;
|
int queries_displayed = 0;
|
||||||
|
|
||||||
@ -850,15 +845,9 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)
|
|||||||
struct agg_node *rn;
|
struct agg_node *rn;
|
||||||
int printedquerier = 0;
|
int printedquerier = 0;
|
||||||
|
|
||||||
|
if (!rfd->mon &&
|
||||||
++nves_total;
|
!(rfd->mon_eth && skiplist_count(rfd->mon_eth)))
|
||||||
|
|
||||||
if (rfd->mon
|
|
||||||
|| (rfd->mon_eth && skiplist_count(rfd->mon_eth))) {
|
|
||||||
++nves_with_queries;
|
|
||||||
} else {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IP Queries
|
* IP Queries
|
||||||
@ -904,8 +893,6 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)
|
|||||||
|
|
||||||
fp(out, "%-15s %-15s", buf_vn, buf_un);
|
fp(out, "%-15s %-15s", buf_vn, buf_un);
|
||||||
printedquerier = 1;
|
printedquerier = 1;
|
||||||
|
|
||||||
++nves_displayed;
|
|
||||||
} else
|
} else
|
||||||
fp(out, "%-15s %-15s", "", "");
|
fp(out, "%-15s %-15s", "", "");
|
||||||
buf_remain[0] = 0;
|
buf_remain[0] = 0;
|
||||||
@ -978,8 +965,6 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)
|
|||||||
|
|
||||||
fp(out, "%-15s %-15s", buf_vn, buf_un);
|
fp(out, "%-15s %-15s", buf_vn, buf_un);
|
||||||
printedquerier = 1;
|
printedquerier = 1;
|
||||||
|
|
||||||
++nves_displayed;
|
|
||||||
} else
|
} else
|
||||||
fp(out, "%-15s %-15s", "", "");
|
fp(out, "%-15s %-15s", "", "");
|
||||||
buf_remain[0] = 0;
|
buf_remain[0] = 0;
|
||||||
|
@ -1986,8 +1986,6 @@ void vnc_import_bgp_exterior_add_route_interior(
|
|||||||
|
|
||||||
if (RFAPI_HAS_MONITOR_EXTERIOR(rn_interior)) {
|
if (RFAPI_HAS_MONITOR_EXTERIOR(rn_interior)) {
|
||||||
|
|
||||||
int count = 0; /* debugging */
|
|
||||||
|
|
||||||
vnc_zlog_debug_verbose(
|
vnc_zlog_debug_verbose(
|
||||||
"%s: has exterior monitor; ext src: %p", __func__,
|
"%s: has exterior monitor; ext src: %p", __func__,
|
||||||
RFAPI_MONITOR_EXTERIOR(rn_interior)->source);
|
RFAPI_MONITOR_EXTERIOR(rn_interior)->source);
|
||||||
@ -2011,9 +2009,6 @@ void vnc_import_bgp_exterior_add_route_interior(
|
|||||||
struct attr new_attr;
|
struct attr new_attr;
|
||||||
uint32_t label = 0;
|
uint32_t label = 0;
|
||||||
|
|
||||||
|
|
||||||
++count; /* debugging */
|
|
||||||
|
|
||||||
assert(bpi_exterior);
|
assert(bpi_exterior);
|
||||||
assert(pfx_exterior);
|
assert(pfx_exterior);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user