Change in osmo-iuh[master]: tests/test-helpers: fix some -Wpointer-sign warnings reported by GCC

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Apr 8 15:38:44 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/17745 )

Change subject: tests/test-helpers: fix some -Wpointer-sign warnings reported by GCC
......................................................................

tests/test-helpers: fix some -Wpointer-sign warnings reported by GCC

Change-Id: I7ebc99fe919fe7ba515c9d8ba601dceb820bf11f
---
M src/tests/test-helpers.c
1 file changed, 10 insertions(+), 10 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
 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 @@
 
 	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 @@
 	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 @@
 	/* 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 @@
 	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);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/17745
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I7ebc99fe919fe7ba515c9d8ba601dceb820bf11f
Gerrit-Change-Number: 17745
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200408/d316959d/attachment.htm>


More information about the gerrit-log mailing list