From: Alberto Leiva Popper Date: Thu, 15 Aug 2024 23:41:55 +0000 (-0600) Subject: Remove redundant forward declarations in ASN1 X-Git-Tag: 1.6.3~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a160f4e0dfa29b570b38bea72e29ca6aa52102d;p=thirdparty%2FFORT-validator.git Remove redundant forward declarations in ASN1 --- diff --git a/src/asn1/asn1c/ASIdentifierChoice.h b/src/asn1/asn1c/ASIdentifierChoice.h index 1c66f74b..ede383be 100644 --- a/src/asn1/asn1c/ASIdentifierChoice.h +++ b/src/asn1/asn1c/ASIdentifierChoice.h @@ -22,9 +22,6 @@ typedef enum ASIdentifierChoice_PR { ASIdentifierChoice_PR_asIdsOrRanges } ASIdentifierChoice_PR; -/* Forward declarations */ -struct ASIdOrRange; - /* ASIdentifierChoice */ typedef struct ASIdentifierChoice { ASIdentifierChoice_PR present; diff --git a/src/asn1/asn1c/ASIdentifiers.h b/src/asn1/asn1c/ASIdentifiers.h index 5c17193d..6f63d002 100644 --- a/src/asn1/asn1c/ASIdentifiers.h +++ b/src/asn1/asn1c/ASIdentifiers.h @@ -12,9 +12,6 @@ #include "asn1/asn1c/constr_SEQUENCE.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct ASIdentifierChoice; - /* ASIdentifiers */ typedef struct ASIdentifiers { struct ASIdentifierChoice *asnum /* OPTIONAL */; diff --git a/src/asn1/asn1c/Extensions.h b/src/asn1/asn1c/Extensions.h index 81badbc3..8f879994 100644 --- a/src/asn1/asn1c/Extensions.h +++ b/src/asn1/asn1c/Extensions.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct Extension; - /* Extensions */ typedef struct Extensions { A_SEQUENCE_OF(struct Extension) list; diff --git a/src/asn1/asn1c/IPAddrBlocks.h b/src/asn1/asn1c/IPAddrBlocks.h index a41fd0af..c5e1e887 100644 --- a/src/asn1/asn1c/IPAddrBlocks.h +++ b/src/asn1/asn1c/IPAddrBlocks.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct IPAddressFamily; - /* IPAddrBlocks */ typedef struct IPAddrBlocks { A_SEQUENCE_OF(struct IPAddressFamily) list; diff --git a/src/asn1/asn1c/IPAddressChoice.h b/src/asn1/asn1c/IPAddressChoice.h index 54ee62ef..62cbdffd 100644 --- a/src/asn1/asn1c/IPAddressChoice.h +++ b/src/asn1/asn1c/IPAddressChoice.h @@ -22,9 +22,6 @@ typedef enum IPAddressChoice_PR { IPAddressChoice_PR_addressesOrRanges } IPAddressChoice_PR; -/* Forward declarations */ -struct IPAddressOrRange; - /* IPAddressChoice */ typedef struct IPAddressChoice { IPAddressChoice_PR present; diff --git a/src/asn1/asn1c/Manifest.h b/src/asn1/asn1c/Manifest.h index c066cf94..c865229f 100644 --- a/src/asn1/asn1c/Manifest.h +++ b/src/asn1/asn1c/Manifest.h @@ -17,9 +17,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct FileAndHash; - /* Manifest */ typedef struct Manifest { INTEGER_t *version /* DEFAULT 0 */; diff --git a/src/asn1/asn1c/RDNSequence.h b/src/asn1/asn1c/RDNSequence.h index 60fb1fa3..dcf98295 100644 --- a/src/asn1/asn1c/RDNSequence.h +++ b/src/asn1/asn1c/RDNSequence.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct RelativeDistinguishedName; - /* RDNSequence */ typedef struct RDNSequence { A_SEQUENCE_OF(struct RelativeDistinguishedName) list; diff --git a/src/asn1/asn1c/ROAIPAddressFamily.h b/src/asn1/asn1c/ROAIPAddressFamily.h index 302b457d..d676528c 100644 --- a/src/asn1/asn1c/ROAIPAddressFamily.h +++ b/src/asn1/asn1c/ROAIPAddressFamily.h @@ -15,9 +15,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct ROAIPAddress; - /* ROAIPAddressFamily */ typedef struct ROAIPAddressFamily { OCTET_STRING_t addressFamily; diff --git a/src/asn1/asn1c/RelativeDistinguishedName.h b/src/asn1/asn1c/RelativeDistinguishedName.h index d41f2d92..89365e99 100644 --- a/src/asn1/asn1c/RelativeDistinguishedName.h +++ b/src/asn1/asn1c/RelativeDistinguishedName.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SET_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct AttributeTypeAndValue; - /* RelativeDistinguishedName */ typedef struct RelativeDistinguishedName { A_SET_OF(struct AttributeTypeAndValue) list; diff --git a/src/asn1/asn1c/RevocationInfoChoices.h b/src/asn1/asn1c/RevocationInfoChoices.h index a37537d4..707aa319 100644 --- a/src/asn1/asn1c/RevocationInfoChoices.h +++ b/src/asn1/asn1c/RevocationInfoChoices.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SET_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct RevocationInfoChoice; - /* RevocationInfoChoices */ typedef struct RevocationInfoChoices { A_SET_OF(struct RevocationInfoChoice) list; diff --git a/src/asn1/asn1c/RouteOriginAttestation.h b/src/asn1/asn1c/RouteOriginAttestation.h index 1320aa77..5a7e2b10 100644 --- a/src/asn1/asn1c/RouteOriginAttestation.h +++ b/src/asn1/asn1c/RouteOriginAttestation.h @@ -16,9 +16,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct ROAIPAddressFamily; - /* RouteOriginAttestation */ typedef struct RouteOriginAttestation { INTEGER_t *version /* DEFAULT 0 */; diff --git a/src/asn1/asn1c/SignedAttributes.h b/src/asn1/asn1c/SignedAttributes.h index 0f6900e4..e54fc9eb 100644 --- a/src/asn1/asn1c/SignedAttributes.h +++ b/src/asn1/asn1c/SignedAttributes.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SET_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct CMSAttribute; - /* SignedAttributes */ typedef struct SignedAttributes { A_SET_OF(struct CMSAttribute) list; diff --git a/src/asn1/asn1c/SignedData.h b/src/asn1/asn1c/SignedData.h index 36270934..1d3a2d18 100644 --- a/src/asn1/asn1c/SignedData.h +++ b/src/asn1/asn1c/SignedData.h @@ -17,10 +17,6 @@ #include "asn1/asn1c/constr_SEQUENCE.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct CertificateSet; -struct RevocationInfoChoices; - /* SignedData */ typedef struct SignedData { CMSVersion_t version; diff --git a/src/asn1/asn1c/SignedDataPKCS7.h b/src/asn1/asn1c/SignedDataPKCS7.h index c019472a..af3484ef 100644 --- a/src/asn1/asn1c/SignedDataPKCS7.h +++ b/src/asn1/asn1c/SignedDataPKCS7.h @@ -17,10 +17,6 @@ #include "asn1/asn1c/constr_SEQUENCE.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct CertificateSet; -struct RevocationInfoChoices; - /* SignedDataPKCS7 */ typedef struct SignedDataPKCS7 { CMSVersion_t version; diff --git a/src/asn1/asn1c/SignerInfo.h b/src/asn1/asn1c/SignerInfo.h index b68ef389..929ac402 100644 --- a/src/asn1/asn1c/SignerInfo.h +++ b/src/asn1/asn1c/SignerInfo.h @@ -18,10 +18,6 @@ #include "asn1/asn1c/constr_SEQUENCE.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct SignedAttributes; -struct UnsignedAttributes; - /* SignerInfo */ typedef struct SignerInfo { CMSVersion_t version; diff --git a/src/asn1/asn1c/SignerInfos.h b/src/asn1/asn1c/SignerInfos.h index 4005a47c..86430b09 100644 --- a/src/asn1/asn1c/SignerInfos.h +++ b/src/asn1/asn1c/SignerInfos.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SET_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct SignerInfo; - /* SignerInfos */ typedef struct SignerInfos { A_SET_OF(struct SignerInfo) list; diff --git a/src/asn1/asn1c/TBSCertList.h b/src/asn1/asn1c/TBSCertList.h index bfbbbfd7..8f083b5c 100644 --- a/src/asn1/asn1c/TBSCertList.h +++ b/src/asn1/asn1c/TBSCertList.h @@ -19,10 +19,6 @@ #include "asn1/asn1c/constr_SEQUENCE_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct Time; -struct Extensions; - /* Forward definitions */ typedef struct TBSCertList__revokedCertificates__Member { CertificateSerialNumber_t userCertificate; diff --git a/src/asn1/asn1c/UnsignedAttributes.h b/src/asn1/asn1c/UnsignedAttributes.h index 9079b59a..a19a0c65 100644 --- a/src/asn1/asn1c/UnsignedAttributes.h +++ b/src/asn1/asn1c/UnsignedAttributes.h @@ -13,9 +13,6 @@ #include "asn1/asn1c/constr_SET_OF.h" #include "asn1/asn1c/constr_TYPE.h" -/* Forward declarations */ -struct CMSAttribute; - /* UnsignedAttributes */ typedef struct UnsignedAttributes { A_SET_OF(struct CMSAttribute) list; diff --git a/src/asn1/asn1c/asn_ioc.h b/src/asn1/asn1c/asn_ioc.h index 90026908..0db8154c 100644 --- a/src/asn1/asn1c/asn_ioc.h +++ b/src/asn1/asn1c/asn_ioc.h @@ -7,8 +7,8 @@ #define ASN_IOC_H #include "asn1/asn1c/asn_system.h" +#include "asn1/asn1c/constr_TYPE.h" -struct asn_TYPE_descriptor_s; struct asn_ioc_cell_s; /* diff --git a/src/asn1/asn1c/ber_decoder.h b/src/asn1/asn1c/ber_decoder.h index 6178c3ac..756bd577 100644 --- a/src/asn1/asn1c/ber_decoder.h +++ b/src/asn1/asn1c/ber_decoder.h @@ -7,9 +7,6 @@ #include "asn1/asn1c/constr_TYPE.h" -struct asn_TYPE_descriptor_s; /* Forward declaration */ -struct asn_codec_ctx_s; /* Forward declaration */ - /* * The BER decoder of any type. * This function may be invoked directly from the application. diff --git a/src/asn1/asn1c/constr_TYPE.h b/src/asn1/asn1c/constr_TYPE.h index 065830e6..18c97d33 100644 --- a/src/asn1/asn1c/constr_TYPE.h +++ b/src/asn1/asn1c/constr_TYPE.h @@ -17,7 +17,6 @@ #include "asn1/asn1c/ber_tlv_length.h" #include "asn1/asn1c/ber_tlv_tag.h" -struct asn_TYPE_descriptor_s; /* Forward declaration */ struct asn_TYPE_member_s; /* Forward declaration */ /* diff --git a/src/asn1/asn1c/constraints.h b/src/asn1/asn1c/constraints.h index 18d97863..230bc232 100644 --- a/src/asn1/asn1c/constraints.h +++ b/src/asn1/asn1c/constraints.h @@ -8,8 +8,6 @@ #include "asn1/asn1c/asn_system.h" #include "asn1/asn1c/constr_TYPE.h" -struct asn_TYPE_descriptor_s; /* Forward declaration */ - /* * Validate the structure according to the ASN.1 constraints. * If errbuf and errlen are given, they shall be pointing to the appropriate diff --git a/src/asn1/asn1c/der_encoder.h b/src/asn1/asn1c/der_encoder.h index c6420b93..ae5581d7 100644 --- a/src/asn1/asn1c/der_encoder.h +++ b/src/asn1/asn1c/der_encoder.h @@ -7,8 +7,6 @@ #include "asn1/asn1c/constr_TYPE.h" -struct asn_TYPE_descriptor_s; /* Forward declaration */ - /* * The DER encoder of any type. May be invoked by the application. * Produces DER- and BER-compliant encoding. (DER is a subset of BER). diff --git a/src/asn1/asn1c/json_encoder.h b/src/asn1/asn1c/json_encoder.h index f1cc4ec5..9acdc8ed 100644 --- a/src/asn1/asn1c/json_encoder.h +++ b/src/asn1/asn1c/json_encoder.h @@ -12,7 +12,7 @@ #include #include -struct asn_TYPE_descriptor_s; /* Forward declaration */ +#include "asn1/asn1c/constr_TYPE.h" json_t *json_encode( const struct asn_TYPE_descriptor_s *type_descriptor, diff --git a/src/asn1/asn1c/xer_encoder.h b/src/asn1/asn1c/xer_encoder.h index 0d9a4a02..6ac103bc 100644 --- a/src/asn1/asn1c/xer_encoder.h +++ b/src/asn1/asn1c/xer_encoder.h @@ -7,8 +7,6 @@ #include "asn1/asn1c/constr_TYPE.h" -struct asn_TYPE_descriptor_s; /* Forward declaration */ - /* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ enum xer_encoder_flags_e { /* Mode of encoding */