aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-03-13 07:36:34 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:20 +0200
commit4dcde42e8a257b4992f29dc5f2acfd0d1f625d97 (patch)
tree8b0429e5a03c01d606d55d217abbdab7ee3759b7 /lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
parentf4e25971233abdc0fe8872cb8d7b5113d4198a3d (diff)
downloadotp-4dcde42e8a257b4992f29dc5f2acfd0d1f625d97.tar.gz
otp-4dcde42e8a257b4992f29dc5f2acfd0d1f625d97.tar.bz2
otp-4dcde42e8a257b4992f29dc5f2acfd0d1f625d97.zip
Eliminate clauses that can never match
Dialyzer issued two new warnings when the 'catch' was removed in the previous commit.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_ber_bin_v2.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl21
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
index 9c224d64a3..d4fd5247d7 100644
--- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
@@ -1468,20 +1468,13 @@ decode_type('BMPString') -> 30;
decode_type('CHOICE') -> 'CHOICE'; % choice gets the tag from the actual alternative
decode_type(Else) -> exit({error,{asn1,{unrecognized_type,Else}}}).
-mkfuncname(WhatKind,DecOrEnc) ->
- case WhatKind of
- #'Externaltypereference'{module=Mod,type=EType} ->
- CurrMod = get(currmod),
- case CurrMod of
- Mod ->
- lists:concat(["'",DecOrEnc,"_",EType,"'"]);
- _ ->
-% io:format("CurrMod: ~p, Mod: ~p~n",[CurrMod,Mod]),
- lists:concat(["'",Mod,"':'",DecOrEnc,"_",EType,"'"])
- end;
- 'ASN1_OPEN_TYPE' ->
- lists:concat(["'",DecOrEnc,"_",WhatKind,"'"])
-
+mkfuncname(#'Externaltypereference'{module=Mod,type=EType}, DecOrEnc) ->
+ CurrMod = get(currmod),
+ case CurrMod of
+ Mod ->
+ lists:concat(["'",DecOrEnc,"_",EType,"'"]);
+ _ ->
+ lists:concat(["'",Mod,"':'",DecOrEnc,"_",EType,"'"])
end.
get_size_constraint(C) ->