diff options
author | Kenneth Lundin <[email protected]> | 2012-08-28 12:46:18 +0200 |
---|---|---|
committer | Kenneth Lundin <[email protected]> | 2012-08-28 12:46:18 +0200 |
commit | d7cb9ee479189946ccaeb5b5170dbf4a4a478adb (patch) | |
tree | f7ab66643c1028b957ef6d14c24695c88562338b /lib/asn1/src | |
parent | ee5133a635f08409fc0e943ea79145bc36acbe4f (diff) | |
download | otp-d7cb9ee479189946ccaeb5b5170dbf4a4a478adb.tar.gz otp-d7cb9ee479189946ccaeb5b5170dbf4a4a478adb.tar.bz2 otp-d7cb9ee479189946ccaeb5b5170dbf4a4a478adb.zip |
Remove Dialyzer warnings
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct.erl | 2 | ||||
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_per.erl | 4 | ||||
-rw-r--r-- | lib/asn1/src/asn1rt_per_bin.erl | 2 | ||||
-rw-r--r-- | lib/asn1/src/asn1rt_per_bin_rt2ct.erl | 5 |
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), |