9
0
Fork 0

misc: Address various compiler warnings in the code

This commit is contained in:
Holger Hans Peter Freyther 2011-11-20 11:11:01 +01:00
parent 6b7ce74b8a
commit e616863190
4 changed files with 4 additions and 26 deletions

View File

@ -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

View File

@ -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;
}
/*

View File

@ -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;

View File

@ -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)