]> granicus.if.org Git - icinga2/commitdiff
Remove unused variables
authorJean Flach <jean-marcel.flach@netways.de>
Mon, 8 Feb 2016 16:10:12 +0000 (17:10 +0100)
committerJean Flach <jean-marcel.flach@netways.de>
Mon, 8 Feb 2016 16:10:12 +0000 (17:10 +0100)
fixes #11111

lib/base/configobject.cpp
lib/remote/apiclient.cpp
lib/remote/consolehandler.cpp

index 6303aee45e37b78b7d465bf3d372c29544bc72cd..b87c07883df088632799b0656ebdd75362f356f5 100644 (file)
@@ -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);
 
index 77ca15db6ad419f7967b48d62ac9df53686438fb..272065cfa7b288822c23983c7b0167f76d397f35 100644 (file)
@@ -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) {
index 9dff65edc6482e2facd09362b74bdd97ccb5a37a..a5c3efd0ad3b9a04b7458893b7afeed3a7cf8e58 100644 (file)
@@ -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;