Fix various compiler warnings all over the code

This commit is contained in:
Harald Welte 2011-02-19 16:48:17 +01:00
parent 5ec26fe983
commit 4d54d0b883
11 changed files with 18 additions and 11 deletions

View File

@ -167,4 +167,6 @@ int int_mncc_recv(struct gsm_network *net, struct msgb *msg);
/* input from CC code into mncc_sock */
int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg);
int mncc_sock_init(struct gsm_network *gsmnet);
#endif

View File

@ -39,4 +39,7 @@ enum bsc_vty_node {
extern int bsc_vty_is_config_node(struct vty *vty, int node);
extern void bsc_replace_string(void *ctx, char **dst, const char *newstr);
int bsc_vty_init(void);
int bsc_vty_init_extra(void);
#endif

View File

@ -2013,7 +2013,6 @@ int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb)
{
struct gsm_bts *bts = ts->trx->bts;
struct abis_om_hdr *oh;
u_int16_t arfcn = htons(ts->trx->arfcn);
u_int8_t zero = 0x00;
struct msgb *msg = nm_msgb_alloc();
u_int8_t len = 2 + 2;
@ -2179,7 +2178,7 @@ int abis_nm_perform_test(struct gsm_bts *bts, u_int8_t obj_class,
{
struct abis_om_hdr *oh;
DEBUGP(DNM, "PEFORM TEST\n");
DEBUGP(DNM, "PEFORM TEST %s\n", get_value_string(test_names, test_nr));
if (!msg)
msg = nm_msgb_alloc();

View File

@ -352,7 +352,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %d\n",
LOGP(DMSC, LOGL_ERROR, "Assignment Compl invalid: %lu\n",
msgb_l3len(msg) - sizeof(*gh));
return;
}
@ -393,7 +393,7 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %d\n",
LOGP(DMSC, LOGL_ERROR, "assignemnt failure unhandled: %lu\n",
msgb_l3len(msg) - sizeof(*gh));
rr_failure = NULL;
} else {

View File

@ -37,6 +37,7 @@
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
#include <openbsc/osmo_msc.h>
#include <openbsc/sms_queue.h>
#include <openbsc/vty.h>
#include "../bscconfig.h"
@ -209,6 +210,8 @@ static void db_sync_timer_cb(void *data)
extern int bts_model_unknown_init(void);
extern int bts_model_bs11_init(void);
extern int bts_model_nanobts_init(void);
extern int bts_model_rbs2k_init(void);
void talloc_ctx_init(void);
extern enum node_type bsc_vty_go_parent(struct vty *vty);

View File

@ -33,6 +33,7 @@
#include <openbsc/gsm_data.h>
#include <openbsc/e1_input.h>
#include <openbsc/abis_nm.h>
#include <openbsc/abis_om2000.h>
#include <osmocore/utils.h>
#include <osmocore/gsm_utils.h>
#include <openbsc/chan_alloc.h>

View File

@ -106,7 +106,7 @@ int e1_reconfig_trx(struct gsm_bts_trx *trx)
oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML, trx,
trx->rsl_tei, SAPI_OML);
if (!oml_link) {
LOGP(DINP, LOGL_ERROR, "TRX (%u/$u) OML link creation "
LOGP(DINP, LOGL_ERROR, "TRX (%u/%u) OML link creation "
"failed\n", trx->bts->nr, trx->nr);
return -ENOMEM;
}

View File

@ -1610,8 +1610,8 @@ static int tch_map(struct gsm_lchan *lchan, struct gsm_lchan *remote_lchan)
if (rc < 0)
return rc;
rc = rsl_ipacc_mdcx_to_rtpsock(remote_lchan);
#warning do we need a check of rc here?
if (rc < 0)
return rc;
/* connect them with each other */
rtp_socket_proxy(lchan->abis_ip.rtp_socket,
remote_lchan->abis_ip.rtp_socket);

View File

@ -547,7 +547,6 @@ int gsm48_rx_rr_modif_ack(struct msgb *msg)
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg)
{
struct gsm48_hdr *gh = msgb_l3(msg);
unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
u_int8_t *data = gh->data;
struct gsm_bts *bts = msg->lchan->ts->trx->bts;
struct bitvec *nbv = &bts->si_common.neigh_list;

View File

@ -39,7 +39,8 @@
#include <osmocore/select.h>
#include <openbsc/mgcp.h>
#include <openbsc/mgcp_internal.h>
#include <osmocom/vty//telnet_interface.h>
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
#include <openbsc/vty.h>
#include <osmocom/vty/command.h>
@ -151,7 +152,7 @@ static int read_call_agent(struct bsc_fd *fd, unsigned int what)
perror("Gateway failed to read");
return -1;
} else if (slen > sizeof(addr)) {
fprintf(stderr, "Gateway received message from outerspace: %d %d\n",
fprintf(stderr, "Gateway received message from outerspace: %lu %d\n",
slen, sizeof(addr));
return -1;
}

View File

@ -340,7 +340,6 @@ DEFUN(subscriber_ussd_notify,
struct gsm_subscriber_connection *conn;
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
struct gsm_subscriber *subscr = get_subscr_by_argv(gsmnet, argv[0], argv[1]);
int rc;
int level;
if (!subscr) {