diff options
author | Raimo Niskanen <[email protected]> | 2018-03-05 10:58:25 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-03-05 10:58:25 +0100 |
commit | c25ef3f11a46046c20e5d8c5e99b36bffb2179d4 (patch) | |
tree | 0df6d2c423a2a8b8c6b8fde41d3ff6d9658ab961 | |
parent | fc0f3a42827003ecbe71f29d279004c606636408 (diff) | |
parent | 57d9dbb0233ed1da15f520cdb3c5d047a346429c (diff) | |
download | otp-c25ef3f11a46046c20e5d8c5e99b36bffb2179d4.tar.gz otp-c25ef3f11a46046c20e5d8c5e99b36bffb2179d4.tar.bz2 otp-c25ef3f11a46046c20e5d8c5e99b36bffb2179d4.zip |
Merge branch 'maint'
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index 82e9326294..c09b0f47d1 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2017. All Rights Reserved. +%% Copyright Ericsson AB 1997-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -47,14 +47,20 @@ dialyzer_suppressions(#gen{erule=per,aligned=Aligned}) -> false -> uper; true -> per end, - case asn1ct_func:is_used({Mod,complete,1}) of + suppress({Mod,complete,1}), + suppress({per_common,to_bitstring,2}), + emit([" ok.",nl]). + +suppress({M,F,A}=MFA) -> + case asn1ct_func:is_used(MFA) of false -> ok; true -> - emit([" _ = complete(Arg),",nl]) - end, - emit([" ok.",nl]). - + Args = + [lists:concat(["element(",I,", Arg)"]) + || I <- lists:seq(1, A)], + emit([" ",{call,M,F,Args},com,nl]) + end. gen_encode(Erules,Type) when is_record(Type,typedef) -> gen_encode_user(Erules,Type). |