aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-11-20 11:11:01 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-11-20 11:11:01 +0100
commite616863190aa9ffcdfab998f133306d7638045c0 (patch)
tree9526ae7daea1c40fb8c80905f3cd42979fa151c3
parent6b7ce74b8a40d207ef5e0764f981b1aae5551d24 (diff)
misc: Address various compiler warnings in the code
-rw-r--r--include/mgcp_ss7.h3
-rw-r--r--src/input/ipaccess.c22
-rw-r--r--src/isup.c3
-rw-r--r--src/mgcp/mgcp_network.c2
4 files changed, 4 insertions, 26 deletions
diff --git a/include/mgcp_ss7.h b/include/mgcp_ss7.h
index eb17158..e09c284 100644
--- a/include/mgcp_ss7.h
+++ b/include/mgcp_ss7.h
@@ -57,4 +57,7 @@ struct mgcp_ss7_cmd {
void mgcp_mgw_vty_init();
+int mgcp_snmp_init();
+int mgcp_snmp_connect(int port, int trunk, int timeslot);
+
#endif
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index ff1c2e7..1b5b7c9 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -56,26 +56,6 @@ static const uint8_t id_req[] = { 0, 17, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_GET,
0x01, IPAC_IDTAG_SERNR,
};
-static const char *idtag_names[] = {
- [IPAC_IDTAG_SERNR] = "Serial_Number",
- [IPAC_IDTAG_UNITNAME] = "Unit_Name",
- [IPAC_IDTAG_LOCATION1] = "Location_1",
- [IPAC_IDTAG_LOCATION2] = "Location_2",
- [IPAC_IDTAG_EQUIPVERS] = "Equipment_Version",
- [IPAC_IDTAG_SWVERSION] = "Software_Version",
- [IPAC_IDTAG_IPADDR] = "IP_Address",
- [IPAC_IDTAG_MACADDR] = "MAC_Address",
- [IPAC_IDTAG_UNIT] = "Unit_ID",
-};
-
-static const char *ipac_idtag_name(int tag)
-{
- if (tag >= ARRAY_SIZE(idtag_names))
- return "unknown";
-
- return idtag_names[tag];
-}
-
/* send the id ack */
int ipaccess_send_id_ack(int fd)
{
@@ -104,7 +84,7 @@ int ipaccess_rcvmsg_base(struct msgb *msg,
ret = ipaccess_send_id_ack(bfd->fd);
break;
}
- return 0;
+ return ret;
}
/*
diff --git a/src/isup.c b/src/isup.c
index 404dbb1..31b4221 100644
--- a/src/isup.c
+++ b/src/isup.c
@@ -94,7 +94,6 @@ static struct msgb *isup_simple_alloc(int cic, int msg_type)
int isup_parse_status(const uint8_t *data, uint8_t in_length)
{
uint8_t ptr;
- uint8_t length;
if (in_length < 3) {
LOGP(DISUP, LOGL_ERROR, "This needs three bytes.\n");
@@ -107,8 +106,6 @@ int isup_parse_status(const uint8_t *data, uint8_t in_length)
return -1;
}
- length = data[0 + ptr];
-
if (1 + ptr + 1 > in_length) {
LOGP(DISUP, LOGL_ERROR, "No space for the data.\n");
return -1;
diff --git a/src/mgcp/mgcp_network.c b/src/mgcp/mgcp_network.c
index 9649b33..a139411 100644
--- a/src/mgcp/mgcp_network.c
+++ b/src/mgcp/mgcp_network.c
@@ -333,11 +333,9 @@ static int rtp_data_bts(struct osmo_fd *fd, unsigned int what)
char buf[4096];
struct sockaddr_in addr;
struct mgcp_endpoint *endp;
- struct mgcp_config *cfg;
int rc, proto;
endp = (struct mgcp_endpoint *) fd->data;
- cfg = endp->cfg;
rc = recevice_from(endp, fd->fd, &addr, buf, sizeof(buf));
if (rc <= 0)