From 79a9a0ed291ab15c002fe129fc00e3d23fc7979c Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Thu, 2 Nov 2017 19:48:35 +0300 Subject: [PATCH] Disable server_host warnings --- src/ejabberd_sql_pt.erl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ejabberd_sql_pt.erl b/src/ejabberd_sql_pt.erl index 197e5ee6d..a32039436 100644 --- a/src/ejabberd_sql_pt.erl +++ b/src/ejabberd_sql_pt.erl @@ -701,8 +701,17 @@ filter_upsert_sh(Table, ParseRes) -> end, ParseRes) end. +-ifdef(ENABLE_PT_WARNINGS). + add_warning(Pos, Warning) -> Marker = erl_syntax:revert( erl_syntax:warning_marker({Pos, ?MODULE, Warning})), put(warnings, [Marker | get(warnings)]), ok. + +-else. + +add_warning(_Pos, _Warning) -> + ok. + +-endif.