aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
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')
-rw-r--r--lib/asn1/src/asn1ct_check.erl4
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl21
2 files changed, 7 insertions, 18 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 91e77219c8..e1e5140e08 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -1816,10 +1816,6 @@ convert_to_defaultfield(S,ObjFieldName,[OFS|RestOFS],CField)->
T = check_type(S,#typedef{typespec=ObjFieldSetting},
ObjFieldSetting),
{#typedef{checked=true,name=Bif,typespec=T},RestSettings};
- _OCFT = #'ObjectClassFieldType'{} ->
- T=check_type(S,#typedef{typespec=ObjFieldSetting},ObjFieldSetting),
- %%io:format("OCFT=~p~n,T=~p~n",[OCFT,T]),
- {#typedef{checked=true,typespec=T},RestSettings};
_ ->
%this case should not happen any more
{Mod,T} =
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) ->