Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- tests/m2ua/m2ua_test.c | 10 +++++----- tests/sccp/sccp_test.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/m2ua/m2ua_test.c b/tests/m2ua/m2ua_test.c index d629ad5..b47bf5a 100644 --- a/tests/m2ua/m2ua_test.c +++ b/tests/m2ua/m2ua_test.c @@ -30,12 +30,12 @@ abort(); \ } while(0);
-static uint8_t asp_up[] = { +static const uint8_t asp_up[] = { 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x11, 0x00, 0x08, 0xac, 0x10, 0x01, 0x51, };
-static uint8_t data[] = { +static const uint8_t data[] = { 0x01, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1a, 0x81, 0x5c, 0x00, 0x07, @@ -49,12 +49,12 @@ static void test_asp_up(void) struct m2ua_msg_part *part; struct m2ua_msg *m2u = m2ua_from_msg(ARRAY_SIZE(asp_up), asp_up); struct msgb *msg = m2ua_to_msg(m2u); - const uint8_t res[] = { 0xac, 0x10, 0x01, 0x51 }; + static const uint8_t res[] = { 0xac, 0x10, 0x01, 0x51 };
printf("Testing ASP UP parsing.\n");
if (msg->len != ARRAY_SIZE(asp_up)) { - printf("Got %d wanted %d\n", msg->len, ARRAY_SIZE(asp_up)); + printf("Got %d wanted %zu\n", msg->len, ARRAY_SIZE(asp_up)); FAIL("Wrong size"); }
@@ -84,7 +84,7 @@ static void test_data(void) printf("Testing parsing of data.\n");
if (msg->len != ARRAY_SIZE(data)) { - printf("Got %d wanted %d\n", msg->len, ARRAY_SIZE(data)); + printf("Got %d wanted %zu\n", msg->len, ARRAY_SIZE(data)); FAIL("Wrong size"); }
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 7cff5d0..ea1b99b 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -991,7 +991,8 @@ static const struct log_info_cat default_categories[] = { }, };
-static int null_flt(void) +static int null_flt(const struct log_context *ctx, + struct log_target *tgt) { return 1; }