summaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-01-01 12:32:03 +0100
committerHarald Welte <laforge@gnumonks.org>2015-01-01 12:32:03 +0100
commit7b1d25a11e44bbc1cb0d2acd9f1a3d4a16ec7c90 (patch)
tree066ebdd55b1df8e83748c3133b0c8a5e952404b9 /openbsc/tests
parent7b129e76cebee739dc959d70d7c8c257e83c76b1 (diff)
Fix most compiler warnings with gcc-4.9.2
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/abis/abis_test.c16
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/openbsc/tests/abis/abis_test.c b/openbsc/tests/abis/abis_test.c
index e7e78d202..df270bfbd 100644
--- a/openbsc/tests/abis/abis_test.c
+++ b/openbsc/tests/abis/abis_test.c
@@ -61,11 +61,11 @@ static void test_simple_sw_config(void)
}
if (descr[0].len != 13) {
- printf("WRONG SIZE: %d\n", descr[0].len);
+ printf("WRONG SIZE: %zu\n", descr[0].len);
abort();
}
- printf("Start: %u len: %zu\n", descr[0].start - simple_config, descr[0].len);
+ printf("Start: %ld len: %zu\n", descr[0].start - simple_config, descr[0].len);
printf("file_id: %s\n", osmo_hexdump(descr[0].file_id, descr[0].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[0].file_ver, descr[0].file_ver_len));
}
@@ -99,20 +99,20 @@ static void test_dual_sw_config(void)
}
if (descr[0].len != 13) {
- printf("WRONG SIZE0: %d\n", descr[0].len);
+ printf("WRONG SIZE0: %zu\n", descr[0].len);
abort();
}
if (descr[1].len != 13) {
- printf("WRONG SIZE1: %d\n", descr[1].len);
+ printf("WRONG SIZE1: %zu\n", descr[1].len);
abort();
}
- printf("Start: %u len: %zu\n", descr[0].start - dual_config, descr[0].len);
+ printf("Start: %ld len: %zu\n", descr[0].start - dual_config, descr[0].len);
printf("file_id: %s\n", osmo_hexdump(descr[0].file_id, descr[0].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[0].file_ver, descr[0].file_ver_len));
- printf("Start: %u len: %zu\n", descr[1].start - dual_config, descr[1].len);
+ printf("Start: %ld len: %zu\n", descr[1].start - dual_config, descr[1].len);
printf("file_id: %s\n", osmo_hexdump(descr[1].file_id, descr[1].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[1].file_ver, descr[1].file_ver_len));
}
@@ -129,11 +129,11 @@ static void test_sw_selection(void)
abort();
}
- printf("Start: %u len: %zu\n", descr[0].start - load_config, descr[0].len);
+ printf("Start: %ld len: %zu\n", descr[0].start - load_config, descr[0].len);
printf("file_id: %s\n", osmo_hexdump(descr[0].file_id, descr[0].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[0].file_ver, descr[0].file_ver_len));
- printf("Start: %u len: %zu\n", descr[1].start - load_config, descr[1].len);
+ printf("Start: %ld len: %zu\n", descr[1].start - load_config, descr[1].len);
printf("file_id: %s\n", osmo_hexdump(descr[1].file_id, descr[1].file_id_len));
printf("file_ver: %s\n", osmo_hexdump(descr[1].file_ver, descr[1].file_ver_len));
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 0fc8af202..0c18ab7b1 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -956,7 +956,7 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg,
int gprs_ns_callback(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
struct msgb *msg, uint16_t bvci)
{
- printf("CALLBACK, event %d, msg length %d, bvci 0x%04x\n%s\n\n",
+ printf("CALLBACK, event %d, msg length %ld, bvci 0x%04x\n%s\n\n",
event, msgb_bssgp_len(msg), bvci,
osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
@@ -983,15 +983,15 @@ ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
real_sendto = dlsym(RTLD_NEXT, "sendto");
if (dest_host == REMOTE_BSS_ADDR)
- printf("MESSAGE to BSS at 0x%08x:%d, msg length %d\n%s\n\n",
+ printf("MESSAGE to BSS at 0x%08x:%d, msg length %zu\n%s\n\n",
dest_host, dest_port,
len, osmo_hexdump(buf, len));
else if (dest_host == REMOTE_SGSN_ADDR)
- printf("MESSAGE to SGSN at 0x%08x:%d, msg length %d\n%s\n\n",
+ printf("MESSAGE to SGSN at 0x%08x:%d, msg length %zu\n%s\n\n",
dest_host, dest_port,
len, osmo_hexdump(buf, len));
else if (dest_host == REMOTE_SGSN2_ADDR)
- printf("MESSAGE to SGSN 2 at 0x%08x:%d, msg length %d\n%s\n\n",
+ printf("MESSAGE to SGSN 2 at 0x%08x:%d, msg length %zu\n%s\n\n",
dest_host, dest_port,
len, osmo_hexdump(buf, len));
else
@@ -1015,15 +1015,15 @@ int gprs_ns_sendmsg(struct gprs_ns_inst *nsi, struct msgb *msg)
if (nsei == SGSN_NSEI)
printf("NS UNITDATA MESSAGE to SGSN, BVCI 0x%04x, "
- "msg length %d (%s)\n",
+ "msg length %zu (%s)\n",
bvci, len, __func__);
else if (nsei == SGSN2_NSEI)
printf("NS UNITDATA MESSAGE to SGSN 2, BVCI 0x%04x, "
- "msg length %d (%s)\n",
+ "msg length %zu (%s)\n",
bvci, len, __func__);
else
printf("NS UNITDATA MESSAGE to BSS, BVCI 0x%04x, "
- "msg length %d (%s)\n",
+ "msg length %zu (%s)\n",
bvci, len, __func__);
if (received_messages) {
@@ -1253,7 +1253,7 @@ static int gprs_process_message(struct gprs_ns_inst *nsi, const char *text, stru
struct msgb *msg;
int ret;
if (data_len > NS_ALLOC_SIZE - NS_ALLOC_HEADROOM) {
- fprintf(stderr, "message too long: %d\n", data_len);
+ fprintf(stderr, "message too long: %zu\n", data_len);
return -1;
}