chore: fix dialyzer warnings

This commit is contained in:
JianBo He 2023-03-30 15:48:42 +08:00
parent 0b6c5c4c91
commit 40c413ac05
9 changed files with 19 additions and 7 deletions

View File

@ -2,7 +2,7 @@
{description, "CoAP Gateway"},
{vsn, "0.1.0"},
{registered, []},
{applications, [kernel, stdlib]},
{applications, [kernel, stdlib, emqx_gateway]},
{env, []},
{modules, []},
{licenses, ["Apache 2.0"]},

View File

@ -37,4 +37,11 @@
config => emqx_config:config()
}.
-type gateway_def() ::
#{
name := gateway_name(),
callback_module := module(),
config_schema_module := module()
}.
-endif.

View File

@ -80,7 +80,11 @@ load_gateway_application(
name => Name,
callback_module => CbMod
})
end.
end;
load_gateway_application(_) ->
?SLOG(error, #{
msg => "invalid_gateway_defination"
}).
load_gateway_by_default() ->
load_gateway_by_default(confs()).

View File

@ -564,6 +564,7 @@ make_compatible_schema2(Path, SchemaFun) ->
Schema
).
-spec find_gateway_definations() -> list(gateway_def()).
find_gateway_definations() ->
lists:flatten(
lists:map(

View File

@ -17,7 +17,7 @@
-module(emqx_lwm2m_channel).
-include_lib("emqx/include/logger.hrl").
-include("src/coap/include/emqx_coap.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include("src/lwm2m/include/emqx_lwm2m.hrl").
%% API

View File

@ -17,7 +17,7 @@
-module(emqx_lwm2m_cmd).
-include_lib("emqx/include/logger.hrl").
-include("src/coap/include/emqx_coap.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
-include("src/lwm2m/include/emqx_lwm2m.hrl").
-export([

View File

@ -15,12 +15,12 @@
%%--------------------------------------------------------------------
-module(emqx_lwm2m_session).
-include("src/coap/include/emqx_coap.hrl").
-include("src/lwm2m/include/emqx_lwm2m.hrl").
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx/include/emqx.hrl").
-include_lib("emqx/include/emqx_mqtt.hrl").
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
-include_lib("emqx_coap/include/emqx_coap.hrl").
%% API
-export([

View File

@ -2,7 +2,7 @@
{description, "MQTT-SN Gateway"},
{vsn, "0.1.0"},
{registered, []},
{applications, [kernel, stdlib]},
{applications, [kernel, stdlib, emqx_gateway]},
{env, []},
{modules, []},
{licenses, ["Apache 2.0"]},

View File

@ -2,7 +2,7 @@
{description, "Stomp Gateway"},
{vsn, "0.1.0"},
{registered, []},
{applications, [kernel, stdlib]},
{applications, [kernel, stdlib, emqx_gateway]},
{env, []},
{modules, []},
{licenses, ["Apache 2.0"]},