|
1 | 1 | %%
|
2 | 2 | %% %CopyrightBegin%
|
3 | 3 | %%
|
4 |
| -%% Copyright Ericsson AB 1997-2017. All Rights Reserved. |
| 4 | +%% Copyright Ericsson AB 1997-2018. All Rights Reserved. |
5 | 5 | %%
|
6 | 6 | %% Licensed under the Apache License, Version 2.0 (the "License");
|
7 | 7 | %% you may not use this file except in compliance with the License.
|
@@ -47,14 +47,20 @@ dialyzer_suppressions(#gen{erule=per,aligned=Aligned}) ->
|
47 | 47 | false -> uper;
|
48 | 48 | true -> per
|
49 | 49 | end,
|
50 |
| - case asn1ct_func:is_used({Mod,complete,1}) of |
| 50 | + suppress({Mod,complete,1}), |
| 51 | + suppress({per_common,to_bitstring,2}), |
| 52 | + emit([" ok.",nl]). |
| 53 | + |
| 54 | +suppress({M,F,A}=MFA) -> |
| 55 | + case asn1ct_func:is_used(MFA) of |
51 | 56 | false ->
|
52 | 57 | ok;
|
53 | 58 | true ->
|
54 |
| - emit([" _ = complete(Arg),",nl]) |
55 |
| - end, |
56 |
| - emit([" ok.",nl]). |
57 |
| - |
| 59 | + Args = |
| 60 | + [lists:concat(["element(",I,", Arg)"]) |
| 61 | + || I <- lists:seq(1, A)], |
| 62 | + emit([" ",{call,M,F,Args},com,nl]) |
| 63 | + end. |
58 | 64 |
|
59 | 65 | gen_encode(Erules,Type) when is_record(Type,typedef) ->
|
60 | 66 | gen_encode_user(Erules,Type).
|
|
0 commit comments