aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-03-02 12:00:01 +0100
committerRaimo Niskanen <[email protected]>2018-03-02 12:00:01 +0100
commit6435643c7ba3553ac07862d820302b91ad91ea40 (patch)
tree4a76054d2f1a64a5faa57e4bd0181e608905a3d2 /lib/asn1
parent92c4f5db635d286f0ca81ecf9e095f1dcfa40754 (diff)
downloadotp-6435643c7ba3553ac07862d820302b91ad91ea40.tar.gz
otp-6435643c7ba3553ac07862d820302b91ad91ea40.tar.bz2
otp-6435643c7ba3553ac07862d820302b91ad91ea40.zip
Dialyzer suppress per_common:to_bitstring/2
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/src/asn1ct_gen_per.erl18
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).