diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-12-21 05:23:44 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-12-25 00:46:12 +0100 |
commit | f33d16404d6cd78bfe33d445d1786f731a036440 (patch) | |
tree | db69c0dd2d6f869c356b131db7a3f4f4344d1c73 | |
parent | 9e17e054e4bc48cf608c6fec1d7729a9ce74b872 (diff) |
compiler warning: asn1tostruct.py: return 0 at end of *_free_*()
Part of the resulting diff in the generated code:
--- /tmp/hnbap_decoder.c 2017-12-24 17:06:50.983979866 +0100
+++ /tmp/hnbap_decoder.c 2017-12-24 17:07:10.760223354 +0100
@@ -1179,6 +1179,7 @@
TNLUpdateResponseIEs_t *tnlUpdateResponseIEs) {
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateResponseIEs->context_ID);
+ return 0;
}
int hnbap_free_tnlupdaterequesties(
@@ -1187,6 +1188,7 @@
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateRequestIEs->context_ID);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RABList, &tnlUpdateRequestIEs->rabList);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Update_cause, &tnlUpdateRequestIEs->update_cause);
+ return 0;
}
int hnbap_free_errorindicationies(
@@ -1197,12 +1199,14 @@
if ((errorIndicationIEs->presenceMask & ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT)
== ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT)
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_CriticalityDiagnostics, &errorIndicationIEs->criticalityDiagnostics);
+ return 0;
}
int hnbap_free_hnbconfigtransferrequesties(
HNBConfigTransferRequestIEs_t *hnbConfigTransferRequestIEs) {
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NeighbourInfoRequestList, &hnbConfigTransferRequestIEs->neighbourInfoRequestList);
+ return 0;
}
int hnbap_free_tnlupdatefailureies(
[etc.]
Related: OS#2670
Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0
-rwxr-xr-x | asn1/utils/asn1tostruct.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 5586e40..0bba9dd 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -389,6 +389,8 @@ for key in iesDefs: iename = re.sub('id-', '', ie[0]) ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename)) f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore)) + + f.write(" return 0;\n") f.write("}\n\n") for key in iesDefs: |