From c1b4a8b7579e524b60e9a58f35ca8f3394925be9 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 8 Feb 2016 17:10:12 +0100 Subject: [PATCH] Remove unused variables fixes #11111 --- lib/base/configobject.cpp | 1 - lib/remote/apiclient.cpp | 1 - lib/remote/consolehandler.cpp | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/base/configobject.cpp b/lib/base/configobject.cpp index 6303aee45..b87c07883 100644 --- a/lib/base/configobject.cpp +++ b/lib/base/configobject.cpp @@ -242,7 +242,6 @@ void ConfigObject::RestoreAttribute(const String& attr, bool updateVersion) String fieldName = tokens[0]; int fid = type->GetFieldId(fieldName); - Field field = type->GetFieldInfo(fid); Value currentValue = GetField(fid); diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index 77ca15db6..272065cfa 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -285,7 +285,6 @@ void ApiClient::ExecuteScriptHttpCompletionCallback(HttpRequest& request, Array::Ptr results = result->Get("results"); Value result; - bool incompleteExpression = false; String errorMessage = "Unexpected result from API."; if (results && results->GetLength() > 0) { diff --git a/lib/remote/consolehandler.cpp b/lib/remote/consolehandler.cpp index 9dff65edc..a5c3efd0a 100644 --- a/lib/remote/consolehandler.cpp +++ b/lib/remote/consolehandler.cpp @@ -35,7 +35,6 @@ using namespace icinga; REGISTER_URLHANDLER("/v1/console", ConsoleHandler); -static int l_ExternalCommands = 0; static boost::mutex l_QueryMutex; static std::map l_ApiScriptFrames; static Timer::Ptr l_FrameCleanupTimer; @@ -241,7 +240,7 @@ std::vector ConsoleHandler::GetAutocompletionSuggestions(const String& w String::SizeType cperiod = word.RFind("."); - if (cperiod != -1) { + if (cperiod != String::NPos) { String pword = word.SubStr(0, cperiod); Value value;