aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-02-25 08:33:04 +0100
committerBjörn Gustavsson <[email protected]>2014-02-28 11:57:05 +0100
commit0e3d94fef11e126b0d772134cd5b3582aa1169f3 (patch)
tree00a317531211491c4301e3049aa0641cec7e9891 /lib/asn1
parentdd4e6365ea8f474bcce4a7882c94a7800289bb27 (diff)
downloadotp-0e3d94fef11e126b0d772134cd5b3582aa1169f3.tar.gz
otp-0e3d94fef11e126b0d772134cd5b3582aa1169f3.tar.bz2
otp-0e3d94fef11e126b0d772134cd5b3582aa1169f3.zip
asn1ct_check: Remove unreachable clauses handling {identifier,_,_}
A named number list as used for ENUMERATED and INTEGER can never have an {identifier,...} tuple in its third position like this: {'NamedNumber',Id,{identifier,_,_}} because asn1ct_parser2:parse_NamedNumber/1 will always replace an identifier tuple with an #Externaluereference{} record.
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/src/asn1ct_check.erl6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 6934e7218d..76166d4fd8 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -4932,9 +4932,6 @@ check_integer(S,NamedNumberList,_C) ->
check_int(S,[{'NamedNumber',Id,Num}|T],Acc) when is_integer(Num) ->
check_int(S,T,[{Id,Num}|Acc]);
-check_int(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
check_int(S,[{'NamedNumber',Id,{'Externalvaluereference',_,Mod,Name}}|T],Acc) ->
Val = dbget_ex(S,Mod,Name),
check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
@@ -5130,9 +5127,6 @@ check_enumerated(S,NamedNumberList,_Constr) ->
%% the latter is returned if the ENUMERATION contains EXTENSIONMARK
check_enum(S,[{'NamedNumber',Id,Num}|T],Acc1,Acc2,Root) when is_integer(Num) ->
check_enum(S,T,[{Id,Num}|Acc1],Acc2,Root);
-check_enum(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc1,Acc2,Root) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_enum(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc1,Acc2,Root);
check_enum(S,['EXTENSIONMARK'|T],Acc1,Acc2,_Root) ->
NewAcc2 = lists:keysort(2,Acc1),
NewList = enum_number(lists:reverse(Acc2),NewAcc2,0,[],[]),