1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 01:39:35 +02:00

Shut up dialyzer/xref if public_key:short_name_hash/1 is not available

This commit is contained in:
Evgeniy Khramtsov 2017-05-13 13:11:08 +03:00
parent 2d17a2850c
commit 061d5f2380
3 changed files with 19 additions and 1 deletions

View file

@ -141,6 +141,15 @@ ProcessVars = fun(_F, [], Acc) ->
_ ->
F(F, Tail, Acc)
end;
(F, [{if_have_fun, MFA, Value} | Tail], Acc) ->
{Mod, Fun, Arity} = MFA,
code:ensure_loaded(Mod),
case erlang:function_exported(Mod, Fun, Arity) of
true ->
F(F, Tail, ProcessSingleVar(F, Value, Acc));
false ->
F(F, Tail, Acc)
end;
(F, [Other1 | Tail1], Acc) ->
F(F, Tail1, [F(F, Other1, []) | Acc]);
(F, Val, Acc) when is_tuple(Val) ->