diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-15 09:48:55 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-15 09:48:55 -0700 |
commit | 72f57749743d8392733ed8248214c271f09f3151 (patch) | |
tree | 71bf804604424b74929fb955c3bf9f79c7f0d22e | |
parent | 17b1ca6fc128faadfd4e7d7861be9c11a5ccffcf (diff) | |
download | quagga-72f57749743d8392733ed8248214c271f09f3151.tar.bz2 quagga-72f57749743d8392733ed8248214c271f09f3151.tar.xz |
Fix compile warnings
Fix printf format warning and make capability table 'const static'
-rw-r--r-- | bgpd/bgp_open.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 84d8191e..540edad0 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -441,7 +441,7 @@ bgp_capability_as4 (struct peer *peer, struct capability_header *hdr) return as4; } -static struct message capcode_str[] = +static const struct message capcode_str[] = { { CAPABILITY_CODE_MP, "MultiProtocol Extensions" }, { CAPABILITY_CODE_REFRESH, "Route Refresh" }, @@ -452,10 +452,10 @@ static struct message capcode_str[] = { CAPABILITY_CODE_REFRESH_OLD, "Route Refresh (Old)" }, { CAPABILITY_CODE_ORF_OLD, "ORF (Old)" }, }; -int capcode_str_max = sizeof(capcode_str)/sizeof(capcode_str[0]); +static const int capcode_str_max = sizeof(capcode_str)/sizeof(capcode_str[0]); /* Minimum sizes for length field of each cap (so not inc. the header) */ -static size_t cap_minsizes[] = +static const size_t cap_minsizes[] = { [CAPABILITY_CODE_MP] = sizeof (struct capability_mp_data), [CAPABILITY_CODE_REFRESH] = CAPABILITY_CODE_REFRESH_LEN, @@ -529,7 +529,8 @@ bgp_capability_parse (struct peer *peer, size_t length, u_char **error) " expected at least %u", peer->host, LOOKUP (capcode_str, caphdr.code), - caphdr.length, cap_minsizes[caphdr.code]); + caphdr.length, + (unsigned) cap_minsizes[caphdr.code]); bgp_notify_send (peer, BGP_NOTIFY_CEASE, 0); return -1; } |