mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix dialyzer warnings
This commit is contained in:
parent
07fdd089a0
commit
2494e39c9e
@ -456,7 +456,7 @@ decode_msg(Msg,Parent, Name, StateName, StateData, Mod, Time, Debug,
|
||||
handle_msg(Msg, Parent, Name, StateName, StateData,
|
||||
Mod, Time, Limits, Queue, QueueLen);
|
||||
_Msg ->
|
||||
Debug1 = sys:handle_debug(Debug, {?MODULE, print_event},
|
||||
Debug1 = sys:handle_debug(Debug, fun print_event/3,
|
||||
{Name, StateName}, {in, Msg}),
|
||||
handle_msg(Msg, Parent, Name, StateName, StateData,
|
||||
Mod, Time, Debug1, Limits, Queue, QueueLen)
|
||||
@ -470,6 +470,8 @@ system_continue(Parent, Debug, [Name, StateName, StateData,
|
||||
loop(Parent, Name, StateName, StateData, Mod, Time, Debug,
|
||||
Limits, Queue, QueueLen).
|
||||
|
||||
-spec system_terminate(term(), _, _, [term(),...]) -> no_return().
|
||||
|
||||
system_terminate(Reason, _Parent, Debug,
|
||||
[Name, StateName, StateData, Mod, _Time, _Limits]) ->
|
||||
terminate(Reason, Name, [], Mod, StateName, StateData, Debug).
|
||||
@ -590,12 +592,12 @@ handle_msg(Msg, Parent, Name, StateName, StateData,
|
||||
From = from(Msg),
|
||||
case catch dispatch(Msg, Mod, StateName, StateData) of
|
||||
{next_state, NStateName, NStateData} ->
|
||||
Debug1 = sys:handle_debug(Debug, {?MODULE, print_event},
|
||||
Debug1 = sys:handle_debug(Debug, fun print_event/3,
|
||||
{Name, NStateName}, return),
|
||||
loop(Parent, Name, NStateName, NStateData,
|
||||
Mod, infinity, Debug1, Limits, Queue, QueueLen);
|
||||
{next_state, NStateName, NStateData, Time1} ->
|
||||
Debug1 = sys:handle_debug(Debug, {?MODULE, print_event},
|
||||
Debug1 = sys:handle_debug(Debug, fun print_event/3,
|
||||
{Name, NStateName}, return),
|
||||
loop(Parent, Name, NStateName, NStateData,
|
||||
Mod, Time1, Debug1, Limits, Queue, QueueLen);
|
||||
@ -664,13 +666,15 @@ reply({To, Tag}, Reply) ->
|
||||
|
||||
reply(Name, {To, Tag}, Reply, Debug, StateName) ->
|
||||
reply({To, Tag}, Reply),
|
||||
sys:handle_debug(Debug, {?MODULE, print_event}, Name,
|
||||
sys:handle_debug(Debug, fun print_event/3, Name,
|
||||
{out, Reply, To, StateName}).
|
||||
|
||||
%%% ---------------------------------------------------
|
||||
%%% Terminate the server.
|
||||
%%% ---------------------------------------------------
|
||||
|
||||
-spec terminate(term(), _, _, atom(), _, _, _) -> no_return().
|
||||
|
||||
terminate(Reason, Name, Msg, Mod, StateName, StateData, Debug) ->
|
||||
case catch Mod:terminate(Reason, StateName, StateData) of
|
||||
{'EXIT', R} ->
|
||||
|
Loading…
Reference in New Issue
Block a user