diff options
| author | Chris Caputo <ccaputo@alt.net> | 2009-06-02 18:40:07 +0100 | 
|---|---|---|
| committer | Paul Jakma <paul@quagga.net> | 2009-06-02 18:45:10 +0100 | 
| commit | 0be8dfb2a95f41f100982085595b7c7505127018 (patch) | |
| tree | add7218b0c518ac0cd276c74fe700b5ed1f26762 /bgpd | |
| parent | 42176e6b01c9ca2b2725952684b2d7792468e861 (diff) | |
[snmp] Compiler warning fixes for when "--enable-snmp" is configured.
Compiled on 32-bit and 64-bit linux gcc 4.1.2 platforms.
No run-time testing on 32-bit and limited run-time testing on 64-bit.
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_snmp.c | 39 | 
1 files changed, 23 insertions, 16 deletions
| diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 576e3e09..0f44e68d 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -43,6 +43,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  #include "bgpd/bgp_attr.h"  #include "bgpd/bgp_route.h"  #include "bgpd/bgp_fsm.h" +#include "bgpd/bgp_snmp.h"  /* BGP4-MIB described in RFC1657. */  #define BGP4MIB 1,3,6,1,2,1,15 @@ -128,12 +129,18 @@ oid bgp_oid [] = { BGP4MIB };  static struct in_addr bgp_empty_addr = {0};  /* Hook functions. */ -static u_char *bgpVersion (); -static u_char *bgpLocalAs (); -static u_char *bgpPeerTable (); -static u_char *bgpRcvdPathAttrTable (); -static u_char *bgpIdentifier (); -static u_char *bgp4PathAttrTable (); +static u_char *bgpVersion (struct variable *, oid [], size_t *, int, +			   size_t *, WriteMethod **); +static u_char *bgpLocalAs (struct variable *, oid [], size_t *, +			   int, size_t *, WriteMethod **); +static u_char *bgpPeerTable (struct variable *, oid [], size_t *, +			     int, size_t *, WriteMethod **); +static u_char *bgpRcvdPathAttrTable (struct variable *, oid [], size_t *, +				     int, size_t *, WriteMethod **); +static u_char *bgpIdentifier (struct variable *, oid [], size_t *, +			      int, size_t *, WriteMethod **); +static u_char *bgp4PathAttrTable (struct variable *, oid [], size_t *, +				  int, size_t *, WriteMethod **);  /* static u_char *bgpTraps (); */  struct variable bgp_variables[] =  @@ -277,7 +284,7 @@ bgpLocalAs (struct variable *v, oid name[], size_t *length,    return SNMP_INTEGER (bgp->as);  } -struct peer * +static struct peer *  peer_lookup_addr_ipv4 (struct in_addr *src)  {    struct bgp *bgp; @@ -302,7 +309,7 @@ peer_lookup_addr_ipv4 (struct in_addr *src)    return NULL;  } -struct peer * +static struct peer *  bgp_peer_lookup_next (struct in_addr *src)  {    struct bgp *bgp; @@ -335,7 +342,7 @@ bgp_peer_lookup_next (struct in_addr *src)    return NULL;  } -struct peer * +static struct peer *  bgpPeerTable_lookup (struct variable *v, oid name[], size_t *length,   		     struct in_addr *addr, int exact)  { @@ -374,7 +381,7 @@ bgpPeerTable_lookup (struct variable *v, oid name[], size_t *length,  }  /* BGP write methods. */ -int +static int  write_bgpPeerTable (int action, u_char *var_val,  		    u_char var_val_type, size_t var_val_len,  		    u_char *statP, oid *name, size_t length, @@ -383,7 +390,7 @@ write_bgpPeerTable (int action, u_char *var_val,    struct in_addr addr;    struct peer *peer;    long intval; -  int bigsize = SNMP_MAX_LEN; +  size_t bigsize = SNMP_MAX_LEN;    if (var_val_type != ASN_INTEGER)       { @@ -446,7 +453,7 @@ write_bgpPeerTable (int action, u_char *var_val,    return SNMP_ERR_NOERROR;  } -u_char * +static u_char *  bgpPeerTable (struct variable *v, oid name[], size_t *length,  	      int exact, size_t *var_len, WriteMethod **write_method)  { @@ -586,7 +593,7 @@ bgpPeerTable (struct variable *v, oid name[], size_t *length,    return NULL;  } -u_char * +static u_char *  bgpIdentifier (struct variable *v, oid name[], size_t *length,  	       int exact, size_t *var_len, WriteMethod **write_method)  { @@ -603,7 +610,7 @@ bgpIdentifier (struct variable *v, oid name[], size_t *length,    return SNMP_IPADDRESS (bgp->router_id);  } -u_char * +static u_char *  bgpRcvdPathAttrTable (struct variable *v, oid name[], size_t *length,  		      int exact, size_t *var_len, WriteMethod **write_method)  { @@ -614,7 +621,7 @@ bgpRcvdPathAttrTable (struct variable *v, oid name[], size_t *length,    return NULL;  } -struct bgp_info * +static struct bgp_info *  bgp4PathAttrLookup (struct variable *v, oid name[], size_t *length,  		    struct bgp *bgp, struct prefix_ipv4 *addr, int exact)  { @@ -751,7 +758,7 @@ bgp4PathAttrLookup (struct variable *v, oid name[], size_t *length,    return NULL;  } -u_char * +static u_char *  bgp4PathAttrTable (struct variable *v, oid name[], size_t *length,  		   int exact, size_t *var_len, WriteMethod **write_method)  { | 
