diff options
author | Björn Gustavsson <[email protected]> | 2016-05-13 10:23:43 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-05-13 10:23:43 +0200 |
commit | b956a9ec915f4ec0ab3d0136ea32d8f5f159ae37 (patch) | |
tree | b381f33b8c42bb6af78d224de42cbacc59be77d8 /lib | |
parent | 24b3b038e357d07f637484416bb29ff1b71c3707 (diff) | |
parent | c9d490bcd66141e1664cc3634445b6f4fefd498c (diff) | |
download | otp-b956a9ec915f4ec0ab3d0136ea32d8f5f159ae37.tar.gz otp-b956a9ec915f4ec0ab3d0136ea32d8f5f159ae37.tar.bz2 otp-b956a9ec915f4ec0ab3d0136ea32d8f5f159ae37.zip |
Merge branch 'bjorn/asn1/dialyzer-warnings/OTP-13579'
* bjorn/asn1/dialyzer-warnings/OTP-13579:
Eliminate dialyzer warnings for unmatched returns
Diffstat (limited to 'lib')
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl index 8f4cf2b9ec..325bea5879 100644 --- a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl +++ b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl @@ -500,9 +500,7 @@ gen_decode_sof(Erules,TypeName,_InnerTypeName,D) when is_record(D,type) -> Atom when is_atom(Atom) -> Atom; _ -> TypeNameSuffix end, - ObjFun = false, - gen_dec_line(Erules,TypeName,ContName,[],Cont,mandatory,ObjFun), - %% gen_dec_line_sof(Erules,Typename,ContName,Cont,ObjFun), + gen_dec_line(Erules,TypeName,ContName,[],Cont,mandatory), emit([" || ",{curr,v}," <- ",{curr,tlv},"].",nl,nl,nl]). @@ -869,7 +867,7 @@ gen_dec_choice_cases(Erules,TopType, [H|T]) -> (?ASN1CT_GEN_BER:decode_class(T1class) bsl 10) + T1number,",_} -> ",nl]), emit([indent(8),"{",{asis,Cname},", "]), - gen_dec_line(Erules,TopType,Cname,[],Type,Prop,false), + gen_dec_line(Erules,TopType,Cname,[],Type,Prop), emit(["};",nl,nl]), Fun(Tail,Fun); ([],_) -> @@ -896,7 +894,7 @@ gen_dec_choice_cases(Erules,TopType, [H|T]) -> (?ASN1CT_GEN_BER:decode_class(FirstT#tag.class) bsl 10) + FirstT#tag.number,", ",{curr,v},"} -> ",nl]), emit([indent(8),"{",{asis,Cname},", "]), - gen_dec_line(Erules,TopType,Cname,[],Type#type{tag=RestT},Prop,false), + gen_dec_line(Erules,TopType,Cname,[],Type#type{tag=RestT},Prop), emit(["};",nl,nl]) end, gen_dec_choice_cases(Erules,TopType, T). @@ -1060,8 +1058,14 @@ gen_optormand_case({'DEFAULT',DefaultValue}, Erules, _TopType, end, emit([indent(9),"_ ->",nl,indent(12)]) end. - +%% Use for SEQUENCE OF and CHOICE. +gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand) -> + %% The matching on the next line is an assertion. + {[],[]} = gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand,false), + ok. + +%% Use for SEQUENCE. gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand,DecObjInf) -> BytesVar = asn1ct_gen:mk_var(asn1ct_name:curr(v)), Tag = |