fix(emqx_lwm2m_timer): Dialyzer warnings
This commit is contained in:
parent
a94b70a95e
commit
8ed5dc0b78
|
@ -33,7 +33,7 @@
|
|||
logger:Level("LWM2M-TIMER: " ++ Format, Args)).
|
||||
|
||||
cancel_timer(#timer_state{tref = TRef}) when is_reference(TRef) ->
|
||||
erlang:cancel_timer(TRef), ok.
|
||||
_ = erlang:cancel_timer(TRef), ok.
|
||||
|
||||
refresh_timer(State=#timer_state{interval = Interval, message = Msg}) ->
|
||||
cancel_timer(State), start_timer(Interval, Msg).
|
||||
|
|
|
@ -86,8 +86,8 @@ stop() ->
|
|||
%% ------------------------------------------------------------------
|
||||
|
||||
init([]) ->
|
||||
ets:new(?LWM2M_OBJECT_DEF_TAB, [set, named_table, protected]),
|
||||
ets:new(?LWM2M_OBJECT_NAME_TO_ID_TAB, [set, named_table, protected]),
|
||||
_ = ets:new(?LWM2M_OBJECT_DEF_TAB, [set, named_table, protected]),
|
||||
_ = ets:new(?LWM2M_OBJECT_NAME_TO_ID_TAB, [set, named_table, protected]),
|
||||
PluginsEtcDir = emqx:get_env(plugins_etc_dir),
|
||||
DefBaseDir = re:replace(PluginsEtcDir, "plugins", "lwm2m_xml", [{return, list}]),
|
||||
BaseDir = application:get_env(emqx_lwm2m, xml_dir, DefBaseDir),
|
||||
|
|
Loading…
Reference in New Issue