[icinga-checkins] icinga.org: icinga2/master: Remove unused variables

git at icinga.org git at icinga.org
Mon Feb 8 17:12:40 CET 2016


Module: icinga2
Branch: master
Commit: 393a6bf6412a6a1863ff0819ebe3a896e1bfa7bb
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=393a6bf6412a6a1863ff0819ebe3a896e1bfa7bb

Author: Jean Flach <jean-marcel.flach at netways.de>
Date:   Mon Feb  8 17:10:12 2016 +0100

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 6303aee..b87c078 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 77ca15d..272065c 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 9dff65e..a5c3efd 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<String, ApiScriptFrame> l_ApiScriptFrames;
 static Timer::Ptr l_FrameCleanupTimer;
@@ -241,7 +240,7 @@ std::vector<String> 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;



More information about the icinga-checkins mailing list