diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-11-11 15:44:52 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2022-11-14 09:52:14 +0100 |
commit | 48c038d3992a41ac96e43feae27be8a454506634 (patch) | |
tree | 1d3693842da85de5ec448bf80978f8bd1b56b40c /src/rua/RUA_CriticalityDiagnostics-IE-List.c | |
parent | 0c04a7e03f2c757cc0d5eebeb5ea501835712cc3 (diff) |
asn1: fix visibility warnings from generated code
Fix warnings from generated asn1 code in order to build osmo-iuh with
werror in a future patch:
../../include/osmocom/hnbap/HNBAP_CriticalityDiagnostics-IE-List.h:29:23: error: ‘struct HNBAP_CriticalityDiagnostics_IE_List__Member’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
These visibility warnings come from "SEQUENCE … OF SEQUENCE" definitions
in the asn1 source files, as described in detail here:
https://github.com/vlm/asn1c/issues/430
It is not possible to tell gcc to just ignore these warnings since they
don't have their own type (unlike e.g. -Wuninitialized). Also it seems
like a huge effort to patch this in asn1c.
So work around the problem the same way the author of the issue worked
around it by rewriting the lines to "SEQUENCE … OF …-Value" and adding
a "…-Value ::= SEQUENCE" line below. Add a script in
asn1/utils/asn1_restructure_sequence_of_sequence.py for the
transformation and apply it.
Related: OS#4462
Change-Id: If84445ed2e0df604b581684dcf83f8520b7da84c
Diffstat (limited to 'src/rua/RUA_CriticalityDiagnostics-IE-List.c')
-rw-r--r-- | src/rua/RUA_CriticalityDiagnostics-IE-List.c | 90 |
1 files changed, 2 insertions, 88 deletions
diff --git a/src/rua/RUA_CriticalityDiagnostics-IE-List.c b/src/rua/RUA_CriticalityDiagnostics-IE-List.c index 43a5179..983756c 100644 --- a/src/rua/RUA_CriticalityDiagnostics-IE-List.c +++ b/src/rua/RUA_CriticalityDiagnostics-IE-List.c @@ -12,97 +12,11 @@ static asn_per_constraints_t asn_PER_type_RUA_CriticalityDiagnostics_IE_List_con { APC_CONSTRAINED, 8, 8, 1l, 256l } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; -static asn_TYPE_member_t asn_MBR_Member_2[] = { - { ATF_NOFLAGS, 0, offsetof(struct RUA_CriticalityDiagnostics_IE_List__Member, iECriticality), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RUA_Criticality, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "iECriticality" - }, - { ATF_NOFLAGS, 0, offsetof(struct RUA_CriticalityDiagnostics_IE_List__Member, iE_ID), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RUA_ProtocolIE_ID, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "iE-ID" - }, - { ATF_NOFLAGS, 0, offsetof(struct RUA_CriticalityDiagnostics_IE_List__Member, typeOfError), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RUA_TypeOfError, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "typeOfError" - }, - { ATF_POINTER, 1, offsetof(struct RUA_CriticalityDiagnostics_IE_List__Member, iE_Extensions), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_RUA_IE_Extensions, - 0, /* Defer constraints checking to the member type */ - 0, /* No PER visible constraints */ - 0, - "iE-Extensions" - }, -}; -static const int asn_MAP_Member_oms_2[] = { 3 }; -static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = { - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iECriticality */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iE-ID */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* typeOfError */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = { - sizeof(struct RUA_CriticalityDiagnostics_IE_List__Member), - offsetof(struct RUA_CriticalityDiagnostics_IE_List__Member, _asn_ctx), - asn_MAP_Member_tag2el_2, - 4, /* Count of tags in the map */ - asn_MAP_Member_oms_2, /* Optional members */ - 1, 0, /* Root/Additions */ - 3, /* Start extensions */ - 5 /* Stop extensions */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_Member_2 = { - "SEQUENCE", - "SEQUENCE", - SEQUENCE_free, - SEQUENCE_print, - SEQUENCE_constraint, - SEQUENCE_decode_ber, - SEQUENCE_encode_der, - SEQUENCE_decode_xer, - SEQUENCE_encode_xer, - SEQUENCE_decode_uper, - SEQUENCE_encode_uper, - SEQUENCE_decode_aper, - SEQUENCE_encode_aper, - 0, /* Use generic outmost tag fetcher */ - asn_DEF_Member_tags_2, - sizeof(asn_DEF_Member_tags_2) - /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ - asn_DEF_Member_tags_2, /* Same as above */ - sizeof(asn_DEF_Member_tags_2) - /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ - 0, /* No PER visible constraints */ - asn_MBR_Member_2, - 4, /* Elements count */ - &asn_SPC_Member_specs_2 /* Additional specs */ -}; - static asn_TYPE_member_t asn_MBR_RUA_CriticalityDiagnostics_IE_List_1[] = { { ATF_POINTER, 0, 0, - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + -1 /* Ambiguous tag (CHOICE?) */, 0, - &asn_DEF_Member_2, + &asn_DEF_RUA_CriticalityDiagnostics_IE_List_Value, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, |