fix(emqx_resource): some dialyzer complaints

This commit is contained in:
Shawn 2021-05-31 12:14:25 +08:00
parent d7755df48b
commit 696d4a4e58
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@
{extra_src_dirs, ["examples"]}.
%% try to override the dialyzer 'race_conditions' defined in the top-level dir,
%% but it doesn't work
{dialyzer, [{warnings, [unmatched_returns, error_handling]}
]}.

View File

@ -175,6 +175,8 @@ code_change(_OldVsn, State, _Extra) ->
%%------------------------------------------------------------------------------
%% suppress the race condition check, as these functions are protected in gproc workers
-dialyzer({nowarn_function, [do_update/4, do_create/3, do_restart/1, do_stop/1, do_health_check/1]}).
do_update(InstId, ResourceType, NewConfig, Params) ->
case lookup(InstId) of
{ok, #{mod := ResourceType, state := ResourceState, config := OldConfig}} ->