Browse Source

fix(emqx_rule_utils): fix Dialyzer warnings

ayodele.akingbule 5 years ago
parent
commit
8ee98e3f20
1 changed files with 2 additions and 0 deletions
  1. 2 0
      apps/emqx_rule_engine/src/emqx_rule_utils.erl

+ 2 - 0
apps/emqx_rule_engine/src/emqx_rule_utils.erl

@@ -122,10 +122,12 @@ proc_cmd(Tokens, Data, Opts) ->
 
 
 %% preprocess SQL with place holders
 %% preprocess SQL with place holders
 -spec(preproc_sql(Sql::binary()) -> {prepare_statement(), prepare_params()}).
 -spec(preproc_sql(Sql::binary()) -> {prepare_statement(), prepare_params()}).
+-dialyzer({nowarn_function,preproc_sql/1}).
 preproc_sql(Sql) ->
 preproc_sql(Sql) ->
     preproc_sql(Sql, '?').
     preproc_sql(Sql, '?').
 
 
 -spec(preproc_sql(Sql::binary(), ReplaceWith :: '?' | '$n') -> {prepare_statement(), prepare_params()}).
 -spec(preproc_sql(Sql::binary(), ReplaceWith :: '?' | '$n') -> {prepare_statement(), prepare_params()}).
+-dialyzer({nowarn_function,preproc_sql/2}).
 preproc_sql(Sql, ReplaceWith) ->
 preproc_sql(Sql, ReplaceWith) ->
     case re:run(Sql, ?EX_PLACE_HOLDER, [{capture, all_but_first, binary}, global]) of
     case re:run(Sql, ?EX_PLACE_HOLDER, [{capture, all_but_first, binary}, global]) of
         {match, PlaceHolders} ->
         {match, PlaceHolders} ->