summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-22 22:08:40 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-23 12:32:00 +0000
commit930d0a70e3c0f7dc6318725a371dbac6ef27b03c (patch)
treecfafcb6c6243c9241a6b9afff5db30c1f65028af
parentafec471557785b4e4c0d379bd3ff0903a732b7cd (diff)
bsc: Fix tons of TTCN3 compiler warnings
-rw-r--r--bsc/BSC_Tests.ttcn9
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn29
-rw-r--r--library/BSSMAP_Emulation.ttcn1
-rw-r--r--library/MGCP_Emulation.ttcn2
-rw-r--r--library/Osmocom_VTY_Functions.ttcn2
-rw-r--r--library/RSL_Emulation.ttcn14
6 files changed, 32 insertions, 25 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index d392a71..e4601eb 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -353,11 +353,12 @@ runs on test_CT {
/* verify we get a CHAN_ACT after CHAN RQD */
testcase TC_chan_act_noreply() runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
+ var RSL_Message rsl_unused;
f_init(1);
IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23)));
- f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+ rsl_unused := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
setverdict(pass);
}
@@ -365,12 +366,13 @@ testcase TC_chan_act_noreply() runs on test_CT {
testcase TC_chan_act_counter() runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
var integer chreq_total;
+ var RSL_Message rsl_unused;
f_init(1);
chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total");
IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23)));
- f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+ rsl_unused := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+1);
setverdict(pass);
@@ -479,7 +481,7 @@ testcase TC_chan_exhaustion() runs on test_CT {
/* expect 5xTCH/F to succeed */
for (i := 0; i < NUM_TCHF_PER_BTS + NUM_SDCCH_PER_BTS; i := i+1) {
- f_chreq_act_ack('23'O, i);
+ var RslChannelNr chan_nr := f_chreq_act_ack('23'O, i);
}
IPA_RSL[0].clear;
@@ -1359,7 +1361,6 @@ function f_ipa_unknown_unit_id(integer mp_bsc_ipa_port) runs on test_CT return b
[] IPA_RSL[0].receive { repeat }
[] T.timeout {
self.stop;
- return false;
}
}
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 659ac36..e648427 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -119,7 +119,6 @@ private function f_get_free_mgcp_conn() runs on MSC_ConnHdlr return integer {
}
setverdict(fail, "Only 2 Connections per EP!");
self.stop;
- return -1;
}
private function f_get_mgcp_conn(MgcpConnectionId cid) runs on MSC_ConnHdlr return integer {
@@ -130,7 +129,6 @@ private function f_get_mgcp_conn(MgcpConnectionId cid) runs on MSC_ConnHdlr retu
}
setverdict(fail, "No Connection for ID ", cid);
self.stop;
- return -1;
}
@@ -140,6 +138,7 @@ altstep as_Media() runs on MSC_ConnHdlr {
var RSL_Message rsl;
var MgcpCommand mgcp_cmd;
var RSL_IE_Body ie;
+ var boolean b_unused;
[not g_media.bts.ipa_crcx_seen] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl {
/* Extract parameters from request + use in response */
if (f_rsl_find_ie(rsl, RSL_IE_IPAC_RTP_PAYLOAD, ie)) {
@@ -157,15 +156,15 @@ altstep as_Media() runs on MSC_ConnHdlr {
}
[g_media.bts.ipa_crcx_seen] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{
/* Extract conn_id, ip, port, rtp_pt2 from request + use in response */
- f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
self.stop;
}
/* mandatory */
- f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
g_media.bts.peer.host := f_inet_ntoa(int2oct(ie.ipa_remote_ip, 4));
- f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_PORT, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_PORT, ie);
g_media.bts.peer.port_nr := ie.ipa_remote_port;
/* optional */
if (f_rsl_find_ie(rsl, RSL_IE_IPAC_RTP_PAYLOAD, ie)) {
@@ -201,15 +200,15 @@ altstep as_Media() runs on MSC_ConnHdlr {
/* on second (new) BTS during hand-over */
[g_media.bts1.ipa_crcx_seen] RSL1.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{
/* Extract conn_id, ip, port, rtp_pt2 from request + use in response */
- f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_CONN_ID, ie);
if (g_media.bts1.conn_id != ie.ipa_conn_id) {
setverdict(fail, "IPA MDCX for unknown ConnId", rsl);
self.stop;
}
/* mandatory */
- f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_IP, ie);
g_media.bts1.peer.host := f_inet_ntoa(int2oct(ie.ipa_remote_ip, 4));
- f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_PORT, ie);
+ b_unused := f_rsl_find_ie(rsl, RSL_IE_IPAC_REMOTE_PORT, ie);
g_media.bts1.peer.port_nr := ie.ipa_remote_port;
/* optional */
if (f_rsl_find_ie(rsl, RSL_IE_IPAC_RTP_PAYLOAD, ie)) {
@@ -330,11 +329,14 @@ const BssmapOps MSC_BssmapOps := {
create_cb := refers(BSSMAP_Emulation.ExpectedCreateCallback),
unitdata_cb := refers(UnitdataCallback),
decode_dtap := false,
- role_ms := false
+ role_ms := false,
+ sccp_addr_local := omit,
+ sccp_addr_peer := omit
}
const MGCPOps MSC_MGCPOps := {
- create_cb := refers(MGCP_Emulation.ExpectedCreateCallback)
+ create_cb := refers(MGCP_Emulation.ExpectedCreateCallback),
+ unitdata_cb := refers(MGCP_Emulation.DummyUnitdataCallback)
}
/* register an expect with the BSSMAP core */
@@ -626,7 +628,7 @@ return boolean {
}
/* establish a channel fully, expecting an assignment matching 'exp' */
-function f_establish_fully(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
+function f_establish_fully_ret(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
runs on MSC_ConnHdlr return PDU_BSSAP {
var PDU_BSSAP bssap;
timer T := 10.0;
@@ -699,6 +701,11 @@ runs on MSC_ConnHdlr return PDU_BSSAP {
return bssap;
}
+function f_establish_fully(PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl)
+runs on MSC_ConnHdlr {
+ var PDU_BSSAP unused := f_establish_fully_ret(ass_cmd, exp_ass_cpl);
+}
+
type record HandoverState {
/* Assignment related bits */
boolean rr_ho_cmpl_seen,
diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index 2d9effc..95b39f3 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -98,6 +98,7 @@ template PDU_DTAP_MT tr_PDU_DTAP_MT(template PDU_ML3_NW_MS dtap, template OCT1 d
template PDU_DTAP_MO tr_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := *) := {
dlci := dlci,
+ skip_seq_patching := ?,
dtap := dtap
}
diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn
index adcb8b5..aaef39e 100644
--- a/library/MGCP_Emulation.ttcn
+++ b/library/MGCP_Emulation.ttcn
@@ -267,7 +267,7 @@ function main(MGCPOps ops, MGCP_conn_parameters p, charstring id) runs on MGCP_E
if (p.callagent_udp_port == -1) {
/* we aren't yet connected to the remote side port, let's fix this */
p.callagent_udp_port := mrf.remPort;
- MGCP_CodecPort_CtrlFunct.f_IPL4_connect(MGCP, p.callagent_ip, p.callagent_udp_port, p.mgw_ip, p.mgw_udp_port, g_mgcp_conn_id, { udp:={} });
+ res := MGCP_CodecPort_CtrlFunct.f_IPL4_connect(MGCP, p.callagent_ip, p.callagent_udp_port, p.mgw_ip, p.mgw_udp_port, g_mgcp_conn_id, { udp:={} });
}
if (ischosen(mrf.msg.command)) {
cmd := mrf.msg.command;
diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index ccea0f2..9258fa5 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -74,7 +74,7 @@ module Osmocom_VTY_Functions {
/* send a VTY command and obtain response until prompt is received */
function f_vty_transceive(TELNETasp_PT pt, charstring tx) {
- f_vty_transceive_ret(pt, tx);
+ var charstring unused := f_vty_transceive_ret(pt, tx);
}
type integer BtsNr (0..255);
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 20a54a9..b743d60 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -184,7 +184,7 @@ runs on RSL_Emulation_CT return integer {
/* create an ew client with given RA and FN */
private function f_cid_create(OCT1 ra, GsmFrameNumber fn, RSL_DchanHdlr comp_ref)
-runs on RSL_Emulation_CT return integer {
+runs on RSL_Emulation_CT {
var integer i;
for (i := 0; i < sizeof(ConnectionTable); i := i+1) {
if (not ispresent(ConnectionTable[i].ra) and
@@ -192,16 +192,15 @@ runs on RSL_Emulation_CT return integer {
ConnectionTable[i].ra := ra;
ConnectionTable[i].ra_fn := fn;
ConnectionTable[i].comp_ref := comp_ref;
- return i;
+ return;
}
}
- log("No free entry in conn table for ", ra, fn);
- return -1;
+ setverdict(fail, "No free entry in conn table for ", ra, fn);
}
/* create an ew client with given RA and FN */
private function f_cid_create_cnr(uint8_t trx_nr, RslChannelNr chan_nr, RSL_DchanHdlr comp_ref)
-runs on RSL_Emulation_CT return integer {
+runs on RSL_Emulation_CT {
var integer i;
for (i := 0; i < sizeof(ConnectionTable); i := i+1) {
if (not ispresent(ConnectionTable[i].ra) and
@@ -210,11 +209,10 @@ runs on RSL_Emulation_CT return integer {
ConnectionTable[i].trx_nr := trx_nr;
ConnectionTable[i].chan_nr := chan_nr;
ConnectionTable[i].comp_ref := comp_ref;
- return i;
+ return;
}
}
- log("No free entry in conn table for ", trx_nr, chan_nr, comp_ref);
- return -1;
+ setverdict(fail, "No free entry in conn table for ", trx_nr, chan_nr, comp_ref);
}