From 89062aeb21e42028a7db6b326088e96c835c6b72 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 7 Apr 2020 21:01:12 +0700 Subject: tests/test-helpers: fix some -Wpointer-sign warnings reported by GCC Change-Id: I7ebc99fe919fe7ba515c9d8ba601dceb820bf11f --- src/tests/test-helpers.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tests/test-helpers.c b/src/tests/test-helpers.c index f218a79..d7ad758 100644 --- a/src/tests/test-helpers.c +++ b/src/tests/test-helpers.c @@ -64,12 +64,12 @@ void test_iu_helpers(void) const uint32_t val1 = 0xdeadbeef; const OCTET_STRING_t text1 = { - .buf = "0123456789012345", + .buf = (uint8_t *) "0123456789012345", .size = 16, }; const OCTET_STRING_t text2 = { - .buf = "01234567890123456789012345678901234567890", + .buf = (uint8_t *) "01234567890123456789012345678901234567890", .size = 40, }; @@ -145,9 +145,9 @@ void test_ranap_common(void) printf("Testing ranap common functions\n"); - printf("PLMN-Id [ %s]", osmo_hexdump((char*)lai.pLMNidentity.buf, + printf("PLMN-Id [ %s]", osmo_hexdump(lai.pLMNidentity.buf, lai.pLMNidentity.size)); - printf(", LAC [ %s]\n", osmo_hexdump((char*)lai.lAC.buf, + printf(", LAC [ %s]\n", osmo_hexdump(lai.lAC.buf, lai.lAC.size)); rc = ranap_parse_lai(&ra_id, &lai); @@ -164,9 +164,9 @@ void test_ranap_common(void) uint8_t plmnid_buf_mnc3[] = { 0x21, 0x43, 0x65 }; lai.pLMNidentity.buf = plmnid_buf_mnc3; - printf("PLMN-Id [ %s]", osmo_hexdump((char*)lai.pLMNidentity.buf, + printf("PLMN-Id [ %s]", osmo_hexdump(lai.pLMNidentity.buf, lai.pLMNidentity.size)); - printf(", LAC [ %s]\n", osmo_hexdump((char*)lai.lAC.buf, + printf(", LAC [ %s]\n", osmo_hexdump(lai.lAC.buf, lai.lAC.size)); rc = ranap_parse_lai(&ra_id, &lai); @@ -182,9 +182,9 @@ void test_ranap_common(void) /* wrong PLMN-Id size */ lai.pLMNidentity.size = 2; - printf("PLMN-Id [ %s]", osmo_hexdump((char*)lai.pLMNidentity.buf, + printf("PLMN-Id [ %s]", osmo_hexdump(lai.pLMNidentity.buf, lai.pLMNidentity.size)); - printf(", LAC [ %s]\n", osmo_hexdump((char*)lai.lAC.buf, + printf(", LAC [ %s]\n", osmo_hexdump(lai.lAC.buf, lai.lAC.size)); rc = ranap_parse_lai(&ra_id, &lai); @@ -196,9 +196,9 @@ void test_ranap_common(void) lai.pLMNidentity.size = 3; lai.lAC.size = 1; - printf("PLMN-Id [ %s]", osmo_hexdump((char*)lai.pLMNidentity.buf, + printf("PLMN-Id [ %s]", osmo_hexdump(lai.pLMNidentity.buf, lai.pLMNidentity.size)); - printf(", LAC [ %s]\n", osmo_hexdump((char*)lai.lAC.buf, + printf(", LAC [ %s]\n", osmo_hexdump(lai.lAC.buf, lai.lAC.size)); rc = ranap_parse_lai(&ra_id, &lai); -- cgit v1.2.3