From 1f63bcb1b318fd8becac26a3061767cb81030b48 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 26 Aug 2015 06:57:24 +0200 Subject: [PATCH] Remove unused argument 'async' refs #9972 --- lib/cli/consolecommand.cpp | 4 ++-- lib/cli/daemonutility.cpp | 4 ++-- lib/config/configcompiler.cpp | 14 +++++++------- lib/config/configcompiler.hpp | 6 +++--- lib/config/configfragment.hpp | 2 +- lib/livestatus/livestatusquery.cpp | 2 +- lib/remote/filterutility.cpp | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index 690fcc14e..e7b96b968 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -106,7 +106,7 @@ static char *ConsoleCompleteHelper(const char *word, int state) Value value; try { - Expression *expr = ConfigCompiler::CompileText("temp", pword, false); + Expression *expr = ConfigCompiler::CompileText("temp", pword); if (expr) value = expr->Evaluate(*l_ScriptFrame); @@ -238,7 +238,7 @@ incomplete: try { lines[fileName] = command; - expr = ConfigCompiler::CompileText(fileName, command, false); + expr = ConfigCompiler::CompileText(fileName, command); if (expr) { Value result = expr->Evaluate(scriptFrame); diff --git a/lib/cli/daemonutility.cpp b/lib/cli/daemonutility.cpp index e98133387..8068a7331 100644 --- a/lib/cli/daemonutility.cpp +++ b/lib/cli/daemonutility.cpp @@ -74,7 +74,7 @@ static void IncludeModule(const String& modulePath, bool& success) if (Utility::PathExists(modulePath + "/include.conf")) { Expression *expr = ConfigCompiler::CompileFile(modulePath + "/include.conf", - true, String(), moduleName); + String(), moduleName); if (!ExecuteExpression(expr)) success = false; @@ -91,7 +91,7 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector& configs, if (!configs.empty()) { BOOST_FOREACH(const String& configPath, configs) { - Expression *expression = ConfigCompiler::CompileFile(configPath, true, String(), "_etc"); + Expression *expression = ConfigCompiler::CompileFile(configPath, String(), "_etc"); success = ExecuteExpression(expression); delete expression; if (!success) diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 1021b54d0..05c495091 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -113,7 +113,7 @@ String ConfigCompiler::GetModule(void) const void ConfigCompiler::CollectIncludes(std::vector& expressions, const String& file, const String& zone, const String& module) { - expressions.push_back(CompileFile(file, true, zone, module)); + expressions.push_back(CompileFile(file, zone, module)); } /** @@ -235,7 +235,7 @@ void ConfigCompiler::HandleLibrary(const String& library) * @returns Configuration items. */ Expression *ConfigCompiler::CompileStream(const String& path, - std::istream *stream, bool async, const String& zone, const String& module) + std::istream *stream, const String& zone, const String& module) { CONTEXT("Compiling configuration stream with name '" + path + "'"); @@ -258,8 +258,8 @@ Expression *ConfigCompiler::CompileStream(const String& path, * @param path The path. * @returns Configuration items. */ -Expression *ConfigCompiler::CompileFile(const String& path, bool async, - const String& zone, const String& module) +Expression *ConfigCompiler::CompileFile(const String& path, const String& zone, + const String& module) { CONTEXT("Compiling configuration file '" + path + "'"); @@ -274,7 +274,7 @@ Expression *ConfigCompiler::CompileFile(const String& path, bool async, Log(LogInformation, "ConfigCompiler") << "Compiling config file: " << path; - return CompileStream(path, &stream, async, zone, module); + return CompileStream(path, &stream, zone, module); } /** @@ -285,10 +285,10 @@ Expression *ConfigCompiler::CompileFile(const String& path, bool async, * @returns Configuration items. */ Expression *ConfigCompiler::CompileText(const String& path, const String& text, - bool async, const String& zone, const String& module) + const String& zone, const String& module) { std::stringstream stream(text); - return CompileStream(path, &stream, async, zone, module); + return CompileStream(path, &stream, zone, module); } /** diff --git a/lib/config/configcompiler.hpp b/lib/config/configcompiler.hpp index 41d981585..7df8e3951 100644 --- a/lib/config/configcompiler.hpp +++ b/lib/config/configcompiler.hpp @@ -86,11 +86,11 @@ public: Expression *Compile(void); static Expression *CompileStream(const String& path, std::istream *stream, - bool async = true, const String& zone = String(), const String& module = String()); - static Expression *CompileFile(const String& path, bool async = true, const String& zone = String(), const String& module = String()); + static Expression *CompileFile(const String& path, const String& zone = String(), + const String& module = String()); static Expression *CompileText(const String& path, const String& text, - bool async = true, const String& zone = String(), const String& module = String()); + const String& zone = String(), const String& module = String()); static void AddIncludeSearchDir(const String& dir); diff --git a/lib/config/configfragment.hpp b/lib/config/configfragment.hpp index 2000d8169..43fd7ec1d 100644 --- a/lib/config/configfragment.hpp +++ b/lib/config/configfragment.hpp @@ -28,7 +28,7 @@ namespace { \ void RegisterConfigFragment(void) \ { \ - icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment, false); \ + icinga::Expression *expression = icinga::ConfigCompiler::CompileText(name, fragment); \ VERIFY(expression); \ icinga::ScriptFrame frame; \ expression->Evaluate(frame); \ diff --git a/lib/livestatus/livestatusquery.cpp b/lib/livestatus/livestatusquery.cpp index e34da40aa..863e18f93 100644 --- a/lib/livestatus/livestatusquery.cpp +++ b/lib/livestatus/livestatusquery.cpp @@ -633,7 +633,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream) Expression *expr = NULL; Value result; try { - expr = ConfigCompiler::CompileText(fileName, m_Command, false); + expr = ConfigCompiler::CompileText(fileName, m_Command); ScriptFrame frame; frame.Locals = lsf.Locals; frame.Self = lsf.Locals; diff --git a/lib/remote/filterutility.cpp b/lib/remote/filterutility.cpp index 4c03cbd50..1939dcf40 100644 --- a/lib/remote/filterutility.cpp +++ b/lib/remote/filterutility.cpp @@ -114,7 +114,7 @@ std::vector FilterUtility::GetFilterTargets(const QueryDescri ConfigType::Ptr dtype = ConfigType::GetByName(type); ASSERT(dtype); - Expression *ufilter = ConfigCompiler::CompileText("", filter, false); + Expression *ufilter = ConfigCompiler::CompileText("", filter); ScriptFrame frame; frame.Sandboxed = true; -- 2.40.0