From: Alexander A. Klimov Date: Mon, 23 Sep 2019 13:09:57 +0000 (+0200) Subject: WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F7529%2Fhead;p=icinga2 WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code --- diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index b02f2b73c..93d3dfa98 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -560,7 +560,7 @@ void WarnOnImplicitlySetGlobalVar(const std::unique_ptr& setLhs, con if (var && setLhsParent.IsObject()) { auto ns (dynamic_pointer_cast(setLhsParent.Get())); - if (ns && ns == ScriptGlobal::GetGlobals()) { + if (ns && ns == ScriptGlobal::GetGlobals() && debug.Path.GetLength()) { const char *opStr = nullptr; switch (setOp) {