summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorChris Caputo <ccaputo@alt.net>2009-06-02 18:40:07 +0100
committerPaul Jakma <paul@quagga.net>2009-06-02 18:45:10 +0100
commit0be8dfb2a95f41f100982085595b7c7505127018 (patch)
treeadd7218b0c518ac0cd276c74fe700b5ed1f26762 /zebra
parent42176e6b01c9ca2b2725952684b2d7792468e861 (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 'zebra')
-rw-r--r--zebra/zebra_snmp.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 7e66e2f6..0fde4bb8 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -90,10 +90,14 @@ extern struct zebra_t zebrad;
oid ipfw_oid [] = { IPFWMIB };
/* Hook functions. */
-u_char * ipFwNumber ();
-u_char * ipFwTable ();
-u_char * ipCidrNumber ();
-u_char * ipCidrTable ();
+static u_char * ipFwNumber (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipFwTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipCidrNumber (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
+static u_char * ipCidrTable (struct variable *, oid [], size_t *,
+ int, size_t *, WriteMethod **);
struct variable zebra_variables[] =
{
@@ -133,7 +137,7 @@ struct variable zebra_variables[] =
};
-u_char *
+static u_char *
ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -158,7 +162,7 @@ ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
return (u_char *)&result;
}
-u_char *
+static u_char *
ipCidrNumber (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -183,7 +187,7 @@ ipCidrNumber (struct variable *v, oid objid[], size_t *objid_len,
return (u_char *)&result;
}
-int
+static int
in_addr_cmp(u_char *p1, u_char *p2)
{
int i;
@@ -199,7 +203,7 @@ in_addr_cmp(u_char *p1, u_char *p2)
return 0;
}
-int
+static int
in_addr_add(u_char *p, int num)
{
int i, ip0;
@@ -224,7 +228,8 @@ in_addr_add(u_char *p, int num)
return 1;
}
-int proto_trans(int type)
+static int
+proto_trans(int type)
{
switch (type)
{
@@ -251,7 +256,7 @@ int proto_trans(int type)
}
}
-void
+static void
check_replace(struct route_node *np2, struct rib *rib2,
struct route_node **np, struct rib **rib)
{
@@ -294,7 +299,7 @@ check_replace(struct route_node *np2, struct rib *rib2,
return;
}
-void
+static void
get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len,
int exact, struct route_node **np, struct rib **rib)
{
@@ -339,7 +344,7 @@ get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len,
* ipForwardDest, ipForwardProto, ipForwardPolicy, ipForwardNextHop
*/
- if (*objid_len > v->namelen)
+ if (*objid_len > (unsigned) v->namelen)
oid2in_addr (objid + v->namelen, MIN(4, *objid_len - v->namelen), &dest);
if (*objid_len > (unsigned) v->namelen + 4)
@@ -441,7 +446,7 @@ get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len,
return;
}
-u_char *
+static u_char *
ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
@@ -546,7 +551,7 @@ ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
return NULL;
}
-u_char *
+static u_char *
ipCidrTable (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{