Umbrella fix build (#7)

* fix(emqx_auth_mongo): Dialyzer warnings

* fix(emqx_auth_mnesia_api): Dialyzer warnings

* fix(emqx_exhook): Dialyzer warnings
This commit is contained in:
Ayodele 2020-11-27 12:45:25 +01:00 committed by Zaiming Shi
parent 0cb9cbce71
commit ff99bc10ad
4 changed files with 7 additions and 7 deletions

View File

@ -145,7 +145,7 @@ do_add_clientid(Params) ->
Password = urldecode(get_value(<<"password">>, Params)), Password = urldecode(get_value(<<"password">>, Params)),
Login = {clientid, Clientid}, Login = {clientid, Clientid},
case validate([login, password], [Login, Password]) of case validate([login, password], [Login, Password]) of
ok -> ok ->
emqx_auth_mnesia_cli:add_user(Login, Password); emqx_auth_mnesia_cli:add_user(Login, Password);
Err -> Err Err -> Err
end. end.
@ -221,7 +221,9 @@ paginate(Tables, MatchSpec, Params, ComparingFun, RowFun) ->
Limit = limit(Params), Limit = limit(Params),
Cursor = qlc:cursor(Qh), Cursor = qlc:cursor(Qh),
case Page > 1 of case Page > 1 of
true -> qlc:next_answers(Cursor, (Page - 1) * Limit); true ->
_ = qlc:next_answers(Cursor, (Page - 1) * Limit),
ok;
false -> ok false -> ok
end, end,
Rows = qlc:next_answers(Cursor, Limit), Rows = qlc:next_answers(Cursor, Limit),

View File

@ -82,8 +82,6 @@ description() -> "Authentication with MongoDB".
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Is Superuser? %% Is Superuser?
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-spec(is_superuser(string(), maybe(#superquery{}), emqx_types:clientinfo()) -> boolean()).
is_superuser(_Pool, undefined, _ClientInfo) -> is_superuser(_Pool, undefined, _ClientInfo) ->
false; false;
is_superuser(Pool, #superquery{collection = Coll, field = Field, selector = Selector}, ClientInfo) -> is_superuser(Pool, #superquery{collection = Coll, field = Field, selector = Selector}, ClientInfo) ->

View File

@ -64,9 +64,9 @@ disable(Name) ->
unsave(Name) unsave(Name)
end. end.
-spec disable_all() -> [term()]. -spec disable_all() -> ok.
disable_all() -> disable_all() ->
[begin disable(Name), Name end || Name <- running()]. lists:foreach(fun disable/1, running()).
%%---------------------------------------------------------- %%----------------------------------------------------------
%% Dispatch APIs %% Dispatch APIs

View File

@ -54,7 +54,7 @@ start(_StartType, _StartArgs) ->
prep_stop(State) -> prep_stop(State) ->
emqx_ctl:unregister_command(exhook), emqx_ctl:unregister_command(exhook),
_ = unload_exhooks(), _ = unload_exhooks(),
_ = unload_all_servers(), ok = unload_all_servers(),
State. State.
stop(_State) -> stop(_State) ->