[PATCH] compiler warning: unconstify arg passed to OCTET_STRING_noalloc()

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Apr 14 12:49:00 UTC 2016


This is after the patch to libasn1c, removing str arg constness.
---
 src/ranap_msg_factory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index bdae92e..461df1a 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -181,7 +181,7 @@ struct msgb *ranap_new_msg_dt(uint8_t sapi, const uint8_t *nas, unsigned int nas
 		ies.sapi = RANAP_SAPI_sapi_0;
 
 	/* Avoid copying + later freeing of OCTET STRING */
-	OCTET_STRING_noalloc(&ies.nas_pdu, nas, nas_len);
+	OCTET_STRING_noalloc(&ies.nas_pdu, (uint8_t*)nas, nas_len);
 
 	/* ies -> dt */
 	rc = ranap_encode_directtransferies(&dt, &ies);
-- 
2.1.4




More information about the OpenBSC mailing list