mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Remove unused variables
This commit is contained in:
parent
c7a37090d0
commit
96e214221d
@ -106,7 +106,7 @@ static int Main(void)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
autoindex = Convert::ToLong(argv[2]);
|
autoindex = Convert::ToLong(argv[2]);
|
||||||
} catch (const std::invalid_argument& ex) {
|
} catch (const std::invalid_argument&) {
|
||||||
Log(LogCritical, "icinga-app")
|
Log(LogCritical, "icinga-app")
|
||||||
<< "Invalid index for --autocomplete: " << argv[2];
|
<< "Invalid index for --autocomplete: " << argv[2];
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
@ -1780,7 +1780,7 @@ String Utility::CreateTempFile(const String& path, int mode, std::fstream& fp)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
fp.open(&targetPath[0], std::ios_base::trunc | std::ios_base::out);
|
fp.open(&targetPath[0], std::ios_base::trunc | std::ios_base::out);
|
||||||
} catch (const std::fstream::failure& e) {
|
} catch (const std::fstream::failure&) {
|
||||||
close(fd);
|
close(fd);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,7 @@ void ConsoleCommand::ExecuteScriptCompletionHandler(boost::mutex& mutex, boost::
|
|||||||
if (eptr) {
|
if (eptr) {
|
||||||
try {
|
try {
|
||||||
boost::rethrow_exception(eptr);
|
boost::rethrow_exception(eptr);
|
||||||
} catch (const ScriptError& ex) {
|
} catch (const ScriptError&) {
|
||||||
eptrOut = boost::current_exception();
|
eptrOut = boost::current_exception();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
Log(LogCritical, "ConsoleCommand")
|
Log(LogCritical, "ConsoleCommand")
|
||||||
|
@ -948,7 +948,7 @@ ExpressionResult TryExceptExpression::DoEvaluate(ScriptFrame& frame, DebugHint *
|
|||||||
try {
|
try {
|
||||||
ExpressionResult tryResult = m_TryBody->Evaluate(frame, dhint);
|
ExpressionResult tryResult = m_TryBody->Evaluate(frame, dhint);
|
||||||
CHECK_RESULT(tryResult);
|
CHECK_RESULT(tryResult);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
ExpressionResult exceptResult = m_ExceptBody->Evaluate(frame, dhint);
|
ExpressionResult exceptResult = m_ExceptBody->Evaluate(frame, dhint);
|
||||||
CHECK_RESULT(exceptResult);
|
CHECK_RESULT(exceptResult);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ void ApiClient::GetTypes(const TypesCompletionCallback& callback) const
|
|||||||
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
||||||
req->AddHeader("Accept", "application/json");
|
req->AddHeader("Accept", "application/json");
|
||||||
m_Connection->SubmitRequest(req, std::bind(TypesHttpCompletionCallback, _1, _2, callback));
|
m_Connection->SubmitRequest(req, std::bind(TypesHttpCompletionCallback, _1, _2, callback));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
callback(boost::current_exception(), std::vector<ApiType::Ptr>());
|
callback(boost::current_exception(), std::vector<ApiType::Ptr>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ void ApiClient::GetObjects(const String& pluralType, const ObjectsCompletionCall
|
|||||||
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
||||||
req->AddHeader("Accept", "application/json");
|
req->AddHeader("Accept", "application/json");
|
||||||
m_Connection->SubmitRequest(req, std::bind(ObjectsHttpCompletionCallback, _1, _2, callback));
|
m_Connection->SubmitRequest(req, std::bind(ObjectsHttpCompletionCallback, _1, _2, callback));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
callback(boost::current_exception(), std::vector<ApiObject::Ptr>());
|
callback(boost::current_exception(), std::vector<ApiObject::Ptr>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ void ApiClient::ExecuteScript(const String& session, const String& command, bool
|
|||||||
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
req->AddHeader("Authorization", "Basic " + Base64::Encode(m_User + ":" + m_Password));
|
||||||
req->AddHeader("Accept", "application/json");
|
req->AddHeader("Accept", "application/json");
|
||||||
m_Connection->SubmitRequest(req, std::bind(ExecuteScriptHttpCompletionCallback, _1, _2, callback));
|
m_Connection->SubmitRequest(req, std::bind(ExecuteScriptHttpCompletionCallback, _1, _2, callback));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
callback(boost::current_exception(), Empty);
|
callback(boost::current_exception(), Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,7 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
tlsStream->Handshake();
|
tlsStream->Handshake();
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
Log(LogCritical, "ApiListener")
|
Log(LogCritical, "ApiListener")
|
||||||
<< "Client TLS handshake failed (" << conninfo << ")";
|
<< "Client TLS handshake failed (" << conninfo << ")";
|
||||||
return;
|
return;
|
||||||
|
@ -271,7 +271,7 @@ std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, c
|
|||||||
provider->FindTargets(type, std::bind(&FilteredAddTarget,
|
provider->FindTargets(type, std::bind(&FilteredAddTarget,
|
||||||
std::ref(permissionFrame), permissionFilter,
|
std::ref(permissionFrame), permissionFilter,
|
||||||
std::ref(frame), ufilter, std::ref(result), variableName, _1));
|
std::ref(frame), ufilter, std::ref(result), variableName, _1));
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
delete ufilter;
|
delete ufilter;
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ bool HttpClientConnection::ProcessMessage(void)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
res = response.Parse(m_Context, false);
|
res = response.Parse(m_Context, false);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
callback(request, response);
|
callback(request, response);
|
||||||
|
|
||||||
m_Stream->Shutdown();
|
m_Stream->Shutdown();
|
||||||
|
@ -146,7 +146,7 @@ static int FormatOutput(const Dictionary::Ptr& result)
|
|||||||
Dictionary::Ptr payload;
|
Dictionary::Ptr payload;
|
||||||
try {
|
try {
|
||||||
payload = payloads->Get(0);
|
payload = payloads->Get(0);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
std::cout << "UNKNOWN: Answer format error: 'payload' was not a Dictionary.\n";
|
std::cout << "UNKNOWN: Answer format error: 'payload' was not a Dictionary.\n";
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ static int FormatOutput(const Dictionary::Ptr& result)
|
|||||||
Dictionary::Ptr line;
|
Dictionary::Ptr line;
|
||||||
try {
|
try {
|
||||||
line = vline;
|
line = vline;
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception&) {
|
||||||
std::cout << "UNKNOWN: Answer format error: 'lines' entry was not a Dictionary.\n";
|
std::cout << "UNKNOWN: Answer format error: 'lines' entry was not a Dictionary.\n";
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ DWORD ServiceStatus(CONST printInfoStruct& printInfo)
|
|||||||
{
|
{
|
||||||
SC_HANDLE hSCM;
|
SC_HANDLE hSCM;
|
||||||
SC_HANDLE hService;
|
SC_HANDLE hService;
|
||||||
DWORD cbBufSize, lpServicesReturned, pcbBytesNeeded;
|
DWORD cbBufSize;
|
||||||
DWORD lpResumeHandle = 0;
|
DWORD lpResumeHandle = 0;
|
||||||
LPBYTE lpBuf = NULL;
|
LPBYTE lpBuf = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user