diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-07-08 13:59:10 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-07-08 14:08:03 +0200 | 
| commit | 37e7007373b8dac7e4a31027cf0bff39ae2a67e4 (patch) | |
| tree | 7b79f4a8e8fbd666f2df8a170c86fdc2a3462a4f /bgpd/bgp_updgrp.c | |
| parent | bc0e6b1993524222ab2eb6cfea81e948600e1e2a (diff) | |
bgpd: work around GCC/plugin shortcomings
The GCC extended printf format checking plugin runs into some GCC
shortcomings regarding casts on printf function parameters.  While this
can be fixed with a small GCC patch, patching GCC is "nontrivial" to say
the least.  Luckily, it happens that this is /almost/ not an issue for
the FRR source base.
Since we fix SA "misunderstandings" too, let's just fix places where the
format checking plugin runs into this limitation to keep things working
extra smoothly.
(It's not a huge effort either, these two spots in bgpd are the only
places that trigger the plugin limitation, and it's been "clean" before
that for more than a year if my memory is right.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_updgrp.c')
| -rw-r--r-- | bgpd/bgp_updgrp.c | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index c2b6632643..adde379fb0 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -421,10 +421,9 @@ static unsigned int updgrp_hash_key_make(const void *p)  	if (bgp_debug_neighbor_events(peer)) {  		zlog_debug( -			"%pBP Update Group Hash: sort: %d UpdGrpFlags: %" PRIu64 -			" UpdGrpAFFlags: %u", +			"%pBP Update Group Hash: sort: %d UpdGrpFlags: %ju UpdGrpAFFlags: %u",  			peer, peer->sort, -			(uint64_t)(peer->flags & PEER_UPDGRP_FLAGS), +			(intmax_t)(peer->flags & PEER_UPDGRP_FLAGS),  			flags & PEER_UPDGRP_AF_FLAGS);  		zlog_debug(  			"%pBP Update Group Hash: addpath: %u UpdGrpCapFlag: %u UpdGrpCapAFFlag: %u route_adv: %u change local as: %u", @@ -464,10 +463,8 @@ static unsigned int updgrp_hash_key_make(const void *p)  			peer->shared_network &&  				peer_afi_active_nego(peer, AFI_IP6));  		zlog_debug( -			"%pBP Update Group Hash: Lonesoul: %" PRIu64 -			" ORF prefix: %u ORF old: %u max prefix out: %u", -			peer, -			(uint64_t)CHECK_FLAG(peer->flags, PEER_FLAG_LONESOUL), +			"%pBP Update Group Hash: Lonesoul: %d ORF prefix: %u ORF old: %u max prefix out: %u", +			peer, !!CHECK_FLAG(peer->flags, PEER_FLAG_LONESOUL),  			CHECK_FLAG(peer->af_cap[afi][safi],  				   PEER_CAP_ORF_PREFIX_SM_RCV),  			CHECK_FLAG(peer->af_cap[afi][safi],  | 
