aboutsummaryrefslogtreecommitdiffstats
path: root/tests/emu
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-04 08:21:17 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-04 10:01:25 +0200
commit1f33294b1c1394c6ff0dd109ff10bb65886c1a44 (patch)
treec54fb3f0f2973d55b538d5bc5b6dfdc68b05621f /tests/emu
parent2acfbebfd3b7fc24ccaf2115e7c8d55e94cd1450 (diff)
pcu: Fix non-critical warnings
These fixes do not affect the semantics of the code. They either help gcc by providing default values that won't be used ("may be uninitialised"), remove unused variables, or change signed to unsigned variables to avoid comparison warnings. Addresses: bts.cpp:494:32: warning: 'tbf' may be used uninitialized in this function emu/test_replay_gprs_attach.cpp:81:27: warning: comparison between signed and unsigned integer expressions emu/test_pdp_activation.cpp:95:23: warning: unused variable ‘budh’ emu/test_pdp_activation.cpp:97:6: warning: variable ‘rc’ set but not used emu/pcu_emu.cpp:109:26: warning: unused variable ‘bts’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ osmocom/core/utils.h:13:50: warning: comparison between signed and unsigned integer expressions types/TypesTest.cpp:319:7: warning: unused variable ‘count’ types/TypesTest.cpp:320:11: warning: unused variable ‘rbb’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ alloc/AllocTest.cpp:132:11: warning: unused variable ‘ts_no’
Diffstat (limited to 'tests/emu')
-rw-r--r--tests/emu/pcu_emu.cpp2
-rw-r--r--tests/emu/test_pdp_activation.cpp4
-rw-r--r--tests/emu/test_replay_gprs_attach.cpp2
3 files changed, 2 insertions, 6 deletions
diff --git a/tests/emu/pcu_emu.cpp b/tests/emu/pcu_emu.cpp
index ed0abbe6..3dfa64dc 100644
--- a/tests/emu/pcu_emu.cpp
+++ b/tests/emu/pcu_emu.cpp
@@ -106,8 +106,6 @@ void create_and_connect_bssgp(struct gprs_rlcmac_bts *bts,
int main(int argc, char **argv)
{
- struct gprs_rlcmac_bts *bts;
-
tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile Emu-PCU context");
if (!tall_pcu_ctx)
abort();
diff --git a/tests/emu/test_pdp_activation.cpp b/tests/emu/test_pdp_activation.cpp
index 673874f5..8c885e58 100644
--- a/tests/emu/test_pdp_activation.cpp
+++ b/tests/emu/test_pdp_activation.cpp
@@ -92,10 +92,8 @@ static enum state current_state = Test_Start;
static void extract_tmsi_and_generate_tlli(struct msgb *msg, struct tlv_parsed *tp)
{
uint32_t tmsi;
- struct bssgp_ud_hdr *budh;
struct gprs_llc_hdr_parsed hp;
struct tlv_parsed ack_tp;
- int rc;
gprs_llc_hdr_parse(&hp, TLVP_VAL(tp, BSSGP_IE_LLC_PDU),
TLVP_LEN(tp, BSSGP_IE_LLC_PDU));
@@ -105,7 +103,7 @@ static void extract_tmsi_and_generate_tlli(struct msgb *msg, struct tlv_parsed *
OSMO_ASSERT(gh->msg_type == GSM48_MT_GMM_ATTACH_ACK);
struct gsm48_attach_ack *ack = (struct gsm48_attach_ack *) gh->data;
- rc = tlv_parse(&ack_tp, &gsm48_gmm_att_tlvdef, ack->data,
+ tlv_parse(&ack_tp, &gsm48_gmm_att_tlvdef, ack->data,
(msg->data + msg->len) - ack->data, 0, 0);
diff --git a/tests/emu/test_replay_gprs_attach.cpp b/tests/emu/test_replay_gprs_attach.cpp
index 8d29a72f..c5098bcb 100644
--- a/tests/emu/test_replay_gprs_attach.cpp
+++ b/tests/emu/test_replay_gprs_attach.cpp
@@ -44,7 +44,7 @@ static const uint8_t gprs_attach_llc[] = {
0x42, 0x00, 0x40, 0xaa, 0xf3, 0x18
};
-static int next_wanted_nu;
+static uint32_t next_wanted_nu;
void test_replay_gprs_attach(struct gprs_bssgp_pcu *pcu)
{