aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-19 16:48:17 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-19 16:48:17 +0100
commit4d54d0b883dcf85cd92290dd4cea51754c70b621 (patch)
tree63fd81471acfedc8e74b162b73882b9de6c351e3 /openbsc
parent5ec26fe98319a65760618f946b4f8c72ba72ff6f (diff)
Fix various compiler warnings all over the code
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/mncc.h2
-rw-r--r--openbsc/include/openbsc/vty.h3
-rw-r--r--openbsc/src/abis_nm.c3
-rw-r--r--openbsc/src/bsc_api.c4
-rw-r--r--openbsc/src/bsc_hack.c3
-rw-r--r--openbsc/src/bsc_vty.c1
-rw-r--r--openbsc/src/e1_config.c2
-rw-r--r--openbsc/src/gsm_04_08.c4
-rw-r--r--openbsc/src/gsm_04_08_utils.c1
-rw-r--r--openbsc/src/mgcp/mgcp_main.c5
-rw-r--r--openbsc/src/vty_interface_layer3.c1
11 files changed, 18 insertions, 11 deletions
diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h
index 075c5b5c..e514c19a 100644
--- a/openbsc/include/openbsc/mncc.h
+++ b/openbsc/include/openbsc/mncc.h
@@ -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
diff --git a/openbsc/include/openbsc/vty.h b/openbsc/include/openbsc/vty.h
index 8c38313a..6ed5f058 100644
--- a/openbsc/include/openbsc/vty.h
+++ b/openbsc/include/openbsc/vty.h
@@ -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
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index f2e68aa1..1a2e0955 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -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();
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c
index 87ab9814..0f09aecd 100644
--- a/openbsc/src/bsc_api.c
+++ b/openbsc/src/bsc_api.c
@@ -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 {
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 14e5d867..8c6d30b0 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -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);
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 6e07a6b7..e5e424ce 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -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>
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c
index 9e191ba6..958839dc 100644
--- a/openbsc/src/e1_config.c
+++ b/openbsc/src/e1_config.c
@@ -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;
}
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 668b8e04..b08b375c 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -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);
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c
index ca1b4723..6d12cc08 100644
--- a/openbsc/src/gsm_04_08_utils.c
+++ b/openbsc/src/gsm_04_08_utils.c
@@ -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;
diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c
index 20b9836e..091d7bdc 100644
--- a/openbsc/src/mgcp/mgcp_main.c
+++ b/openbsc/src/mgcp/mgcp_main.c
@@ -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;
}
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 526ae9e4..a5752748 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -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) {