summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-04 06:44:57 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2015-04-21 10:19:10 +0200
commitdfee58f1d41a2e36c7f5f38a3ef5712224131824 (patch)
tree10e588443180a85a6ac019db1ded6b1144f32a7c /lib
parent6769f43de9d595b935f2ebf1cae1428e1d1a3a5f (diff)
downloadquagga-dfee58f1d41a2e36c7f5f38a3ef5712224131824.tar.bz2
quagga-dfee58f1d41a2e36c7f5f38a3ef5712224131824.tar.xz
snmp: fix warnings
batch-fix all warnings that come up when enabling AgentX SNMP support. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/smux.h6
-rw-r--r--lib/snmp.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/smux.h b/lib/smux.h
index 02e96309..dc91cac7 100644
--- a/lib/smux.h
+++ b/lib/smux.h
@@ -55,8 +55,8 @@ struct trap_object
/* Declare SMUX return value. */
#define SNMP_LOCAL_VARIABLES \
- static long snmp_int_val; \
- static struct in_addr snmp_in_addr_val;
+ static long snmp_int_val __attribute__ ((unused)); \
+ static struct in_addr snmp_in_addr_val __attribute__ ((unused));
#define SNMP_INTEGER(V) \
( \
@@ -108,7 +108,7 @@ extern int smux_trap (struct variable *, size_t,
const struct trap_object *, size_t,
u_char);
-extern int oid_compare (oid *, int, oid *, int);
+extern int oid_compare (const oid *, int, const oid *, int);
extern void oid2in_addr (oid [], int, struct in_addr *);
extern void *oid_copy (void *, const void *, size_t);
extern void oid_copy_addr (oid [], struct in_addr *, int);
diff --git a/lib/snmp.c b/lib/snmp.c
index 79595a1e..f6f9845e 100644
--- a/lib/snmp.c
+++ b/lib/snmp.c
@@ -30,7 +30,7 @@
#define min(A,B) ((A) < (B) ? (A) : (B))
int
-oid_compare (oid *o1, int o1_len, oid *o2, int o2_len)
+oid_compare (const oid *o1, int o1_len, const oid *o2, int o2_len)
{
int i;