aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-08-30 16:01:26 +0200
committerBjörn-Egil Dahlberg <[email protected]>2012-08-30 16:01:26 +0200
commitda477e3fc1bcac8d8afb4d3eef6d250d4eae37e0 (patch)
treeb4d13bd9a97491abb3dbc6112a535b389b73f0a3 /lib/asn1
parent4685b50df9f7f4205502142bb3e2aa62ea259400 (diff)
parentd7cb9ee479189946ccaeb5b5170dbf4a4a478adb (diff)
downloadotp-da477e3fc1bcac8d8afb4d3eef6d250d4eae37e0.tar.gz
otp-da477e3fc1bcac8d8afb4d3eef6d250d4eae37e0.tar.bz2
otp-da477e3fc1bcac8d8afb4d3eef6d250d4eae37e0.zip
Merge branch 'kenneth/asn1/dialyzer-warnings' into maint
* kenneth/asn1/dialyzer-warnings: Remove Dialyzer warnings
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/src/asn1ct.erl2
-rw-r--r--lib/asn1/src/asn1ct_constructed_per.erl4
-rw-r--r--lib/asn1/src/asn1rt_per_bin.erl2
-rw-r--r--lib/asn1/src/asn1rt_per_bin_rt2ct.erl5
4 files changed, 2 insertions, 11 deletions
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index 99755a95a6..8e971a1c76 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -833,7 +833,7 @@ generate({true,{M,_Module,GenTOrV}},OutFile,EncodingRule,Options) ->
asn1ct_table:new(check_functions),
%% create decoding function names and taglists for partial decode
- case specialized_decode_prepare(EncodingRule,M,GenTOrV,Options) of
+ case (catch specialized_decode_prepare(EncodingRule,M,GenTOrV,Options)) of
{error, Reason} -> warning("Error in configuration file: ~n~p~n",
[Reason], Options,
"Error in configuration file");
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl
index 5f5138ef23..5880b78e55 100644
--- a/lib/asn1/src/asn1ct_constructed_per.erl
+++ b/lib/asn1/src/asn1ct_constructed_per.erl
@@ -119,9 +119,7 @@ gen_encode_constructed(Erule,Typename,D) when is_record(D,type) ->
"end,",nl]),
asn1ct_name:new(val)
end,
- lists:foreach(ExtGroupFun,ExtGroupPosLenList);
- _ -> % no extensionAdditionGroup
- ok
+ lists:foreach(ExtGroupFun,ExtGroupPosLenList)
end,
asn1ct_name:new(tmpval),
emit(["Extensions = ?RT_PER:fixextensions(",{asis,Ext},",",
diff --git a/lib/asn1/src/asn1rt_per_bin.erl b/lib/asn1/src/asn1rt_per_bin.erl
index 85988aa21d..e63920dc4e 100644
--- a/lib/asn1/src/asn1rt_per_bin.erl
+++ b/lib/asn1/src/asn1rt_per_bin.erl
@@ -803,8 +803,6 @@ decode_unconstrained_number(Bytes) ->
{Ints,Bytes3} = getoctets_as_list(Bytes2,Len),
{dec_integer(Ints),Bytes3}.
-dec_pos_integer(Ints) ->
- decpint(Ints, 8 * (length(Ints) - 1)).
dec_integer(Ints) when hd(Ints) band 255 =< 127 -> %% Positive number
decpint(Ints, 8 * (length(Ints) - 1));
dec_integer(Ints) -> %% Negative
diff --git a/lib/asn1/src/asn1rt_per_bin_rt2ct.erl b/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
index 46d4bcb065..cd8a958c7d 100644
--- a/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
+++ b/lib/asn1/src/asn1rt_per_bin_rt2ct.erl
@@ -723,17 +723,12 @@ decode_unconstrained_number(Bytes) ->
{Ints,Bytes3} = getoctets_as_bin(Bytes2,Len),
{dec_integer(Ints),Bytes3}.
-
-dec_pos_integer(Ints) ->
- decpint(Ints).
dec_integer(Bin = <<0:1,_:7,_/binary>>) ->
decpint(Bin);
dec_integer(<<_:1,B:7,BitStr/bitstring>>) ->
Size = bit_size(BitStr),
<<I:Size>> = BitStr,
(-128 + B) bsl bit_size(BitStr) bor I.
-
-
decpint(Bin) ->
Size = bit_size(Bin),