소스 검색

fix(emqx_auth_mnesia): Dialyzer warnings

ayodele.akingbule 5 년 전
부모
커밋
7998ea1703
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      apps/emqx_auth_mnesia/src/emqx_auth_mnesia.erl

+ 3 - 3
apps/emqx_auth_mnesia/src/emqx_auth_mnesia.erl

@@ -37,9 +37,9 @@ init(#{clientid_list := ClientidList, username_list := UsernameList}) ->
             {disc_copies, [node()]},
             {attributes, record_info(fields, emqx_user)},
             {storage_properties, [{ets, [{read_concurrency, true}]}]}]),
-    [ add_default_user({{clientid, iolist_to_binary(Clientid)}, iolist_to_binary(Password)})
+    _ = [ add_default_user({{clientid, iolist_to_binary(Clientid)}, iolist_to_binary(Password)})
       || {Clientid, Password} <- ClientidList],
-    [ add_default_user({{username, iolist_to_binary(Username)}, iolist_to_binary(Password)})
+    _ = [ add_default_user({{username, iolist_to_binary(Username)}, iolist_to_binary(Password)})
       || {Username, Password} <- UsernameList],
     ok = ekka_mnesia:copy_table(emqx_user, disc_copies).
 
@@ -59,7 +59,7 @@ check(ClientInfo = #{ clientid := Clientid
                               ({?TABLE, {username, X }, Password, InterTime}) when X =:= Username andalso X =/= undefined -> Password
                            end),
     case ets:select(?TABLE, MatchSpec) of
-        [] -> 
+        [] ->
             emqx_metrics:inc(?AUTH_METRICS(ignore)),
             ok;
         List ->