diff options
author | Björn Gustavsson <[email protected]> | 2014-04-16 09:36:06 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-05-06 11:39:43 +0200 |
commit | a86d63b3940c19dedb6ebcf0f684fa9641a9833e (patch) | |
tree | 74b6d2c2a0f68183d164be4fa0641e713701142d /lib/asn1/src/asn1ct_gen_per.erl | |
parent | 1e8f50885a6faf95d8780cacd918b9084eba8b49 (diff) | |
download | otp-a86d63b3940c19dedb6ebcf0f684fa9641a9833e.tar.gz otp-a86d63b3940c19dedb6ebcf0f684fa9641a9833e.tar.bz2 otp-a86d63b3940c19dedb6ebcf0f684fa9641a9833e.zip |
BER: Suppress dialyzer warnings for encode_bit_string/4
We don't want to touch the code used for encoding BIT STRINGs when
'legacy_erl_types' is active, since it will be removed within two
or three major releases. But we do want to suppress the dialyzer
warnings in the meantime. The easiest way is to call
encode_bit_string/4 with unknown types from an exported function
that is never actually called like this:
-export(['dialyzer-suppressions'/0]).
'dialyzer-suppressions'(Arg) ->
{A,B,C,D} = Arg,
encode_bit_string(A, B, C, D),
ok.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index 519ce9f054..cf6ec49e9f 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,9 @@ %% Generate ENCODING ****************************** %%****************************************x +dialyzer_suppressions(_) -> + emit([" ok.",nl]). + gen_encode(Erules,Type) when is_record(Type,typedef) -> gen_encode_user(Erules,Type). |