Change in osmo-iuh[master]: RFC: WIP: Fix compilation warnings

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Oct 21 14:46:55 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/25886 )


Change subject: RFC: WIP: Fix compilation warnings
......................................................................

RFC: WIP: Fix compilation warnings

This seems to solve the compilation warnings we get when including the
related headers.
This needs to be applied for each of the in-place struct definitions. If
I'm correct it's around 20 of them.

The question is: Are these generated somehow? can we apply the proposed
fixed in the ASN1 compiler?

Change-Id: I36b6dc391af58334ab87986e76a0b63c4c3dfffa
---
M include/osmocom/hnbap/CriticalityDiagnostics-IE-List.h
M src/hnbap/CriticalityDiagnostics-IE-List.c
2 files changed, 22 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/86/25886/1

diff --git a/include/osmocom/hnbap/CriticalityDiagnostics-IE-List.h b/include/osmocom/hnbap/CriticalityDiagnostics-IE-List.h
index 3e24ec9..73ac3fd 100644
--- a/include/osmocom/hnbap/CriticalityDiagnostics-IE-List.h
+++ b/include/osmocom/hnbap/CriticalityDiagnostics-IE-List.h
@@ -26,22 +26,24 @@
 /* Forward declarations */
 struct IE_Extensions;
 
+typedef struct CriticalityDiagnostics_IE_List_Member {
+	Criticality_t	 iECriticality;
+	ProtocolIE_ID_t	 iE_ID;
+	TypeOfError_t	 typeOfError;
+	struct IE_Extensions	*iE_Extensions	/* OPTIONAL */;
+	/*
+	 * This type is extensible,
+	 * possible extensions are below.
+	 */
+
+	/* Context for parsing across buffer boundaries */
+	asn_struct_ctx_t _asn_ctx;
+} CriticalityDiagnostics_IE_List_Member_t;
+
 /* CriticalityDiagnostics-IE-List */
 typedef struct CriticalityDiagnostics_IE_List {
-	A_SEQUENCE_OF(struct Member {
-		Criticality_t	 iECriticality;
-		ProtocolIE_ID_t	 iE_ID;
-		TypeOfError_t	 typeOfError;
-		struct IE_Extensions	*iE_Extensions	/* OPTIONAL */;
-		/*
-		 * This type is extensible,
-		 * possible extensions are below.
-		 */
-		
-		/* Context for parsing across buffer boundaries */
-		asn_struct_ctx_t _asn_ctx;
-	} ) list;
-	
+	A_SEQUENCE_OF(CriticalityDiagnostics_IE_List_Member_t) list;
+
 	/* Context for parsing across buffer boundaries */
 	asn_struct_ctx_t _asn_ctx;
 } CriticalityDiagnostics_IE_List_t;
diff --git a/src/hnbap/CriticalityDiagnostics-IE-List.c b/src/hnbap/CriticalityDiagnostics-IE-List.c
index b3f48e8..30e9a7e 100644
--- a/src/hnbap/CriticalityDiagnostics-IE-List.c
+++ b/src/hnbap/CriticalityDiagnostics-IE-List.c
@@ -13,7 +13,7 @@
 	0, 0	/* No PER value map */
 };
 static asn_TYPE_member_t asn_MBR_Member_2[] = {
-	{ ATF_NOFLAGS, 0, offsetof(struct Member, iECriticality),
+	{ ATF_NOFLAGS, 0, offsetof(CriticalityDiagnostics_IE_List_Member_t, iECriticality),
 		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
 		-1,	/* IMPLICIT tag at current level */
 		&asn_DEF_Criticality,
@@ -22,7 +22,7 @@
 		0,
 		"iECriticality"
 		},
-	{ ATF_NOFLAGS, 0, offsetof(struct Member, iE_ID),
+	{ ATF_NOFLAGS, 0, offsetof(CriticalityDiagnostics_IE_List_Member_t, iE_ID),
 		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
 		-1,	/* IMPLICIT tag at current level */
 		&asn_DEF_ProtocolIE_ID,
@@ -31,7 +31,7 @@
 		0,
 		"iE-ID"
 		},
-	{ ATF_NOFLAGS, 0, offsetof(struct Member, typeOfError),
+	{ ATF_NOFLAGS, 0, offsetof(CriticalityDiagnostics_IE_List_Member_t, typeOfError),
 		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
 		-1,	/* IMPLICIT tag at current level */
 		&asn_DEF_TypeOfError,
@@ -40,7 +40,7 @@
 		0,
 		"typeOfError"
 		},
-	{ ATF_POINTER, 1, offsetof(struct Member, iE_Extensions),
+	{ ATF_POINTER, 1, offsetof(CriticalityDiagnostics_IE_List_Member_t, iE_Extensions),
 		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
 		-1,	/* IMPLICIT tag at current level */
 		&asn_DEF_IE_Extensions,
@@ -61,8 +61,8 @@
     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
 };
 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
-	sizeof(struct Member),
-	offsetof(struct Member, _asn_ctx),
+	sizeof(CriticalityDiagnostics_IE_List_Member_t),
+	offsetof(CriticalityDiagnostics_IE_List_Member_t, _asn_ctx),
 	asn_MAP_Member_tag2el_2,
 	4,	/* Count of tags in the map */
 	asn_MAP_Member_oms_2,	/* Optional members */
@@ -143,4 +143,3 @@
 	1,	/* Single element */
 	&asn_SPC_CriticalityDiagnostics_IE_List_specs_1	/* Additional specs */
 };
-

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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I36b6dc391af58334ab87986e76a0b63c4c3dfffa
Gerrit-Change-Number: 25886
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211021/f0154c57/attachment.htm>


More information about the gerrit-log mailing list