diff options
author | Björn Gustavsson <[email protected]> | 2014-06-16 12:03:08 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-06-16 12:03:08 +0200 |
commit | 26e63b26e605a74ba0a0a58c1fb1cb0ba358efed (patch) | |
tree | 30b4f613f1d24c5db5d3827d48b74c6220a5cd03 /lib/asn1/src/asn1ct_gen_per.erl | |
parent | 5a2aedb547c7e878d3694e8695a7985192a0a4d7 (diff) | |
parent | 0db2668288bf399983e0f6daac85b00d68ab0360 (diff) | |
download | otp-26e63b26e605a74ba0a0a58c1fb1cb0ba358efed.tar.gz otp-26e63b26e605a74ba0a0a58c1fb1cb0ba358efed.tar.bz2 otp-26e63b26e605a74ba0a0a58c1fb1cb0ba358efed.zip |
Merge branch 'bjorn/asn1/dialyzer-warnings/OTP-11372' into maint
* bjorn/asn1/dialyzer-warnings/OTP-11372: (23 commits)
BER: Eliminate dialyzer warnings for specialized decode functions
BER: Eliminate dialyzer warning for encoding of BIT STRINGs
BER: Optimize encoding of ENUMERATED
BER: Remove a redundant clause in encoding of open types
(U)PER: Fix decoding of named INTEGER
(U)PER: Fix encoding of a semi-constrained, named INTEGER
(U)PER: Optimize handling of named BIT STRING with a lower zero bound
PER: Optimize encoding of character strings with simple ranges
PER: Remove unnecessary clause for handling DEFAULT
(U)PER: Suppress dialyzer warnings for complete/1
Test suites: Add support for running Dialyzer on generated code
Improve tests of DEFAULT values
Correct OCTET STRING default when legacy_erlang_types is active
Remove old DEFAULT-checking code made obsolete in the previous commit
Rewrite the code for testing DEFAULT for DER
Test DEFAULT more thoroughly
Set.py: Correct illegal DEFAULT value
BER: Optimize decoding of ENUMERATED
BER: Suppress dialyzer warnings for encode_bit_string/4
BER: Inline testing of constraints when decoding
...
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index 519ce9f054..39cc0536f8 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -32,6 +32,7 @@ -export([gen_encode/2, gen_encode/3]). -export([gen_dec_external/2]). -export([extaddgroup2sequence/1]). +-export([dialyzer_suppressions/1]). -import(asn1ct_gen, [emit/1,demit/1]). -import(asn1ct_func, [call/3]). @@ -40,6 +41,15 @@ %% Generate ENCODING ****************************** %%****************************************x +dialyzer_suppressions(Erules) -> + case asn1ct_func:is_used({Erules,complete,1}) of + false -> + ok; + true -> + emit([" _ = complete(Arg),",nl]) + end, + emit([" ok.",nl]). + gen_encode(Erules,Type) when is_record(Type,typedef) -> gen_encode_user(Erules,Type). |