mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
Silence compiler warnings about unused parameters
Every of these parameters exists for a reason. The best we can do is to convince the compiler.
This commit is contained in:
parent
aa0e7b6c7d
commit
4ba46f9eb2
54 changed files with 167 additions and 162 deletions
|
|
@ -421,7 +421,7 @@ void ConfigObject::OnAllConfigLoaded()
|
|||
m_Zone = ctype->GetObject(zoneName);
|
||||
}
|
||||
|
||||
void ConfigObject::CreateChildObjects(const Type::Ptr& childType)
|
||||
void ConfigObject::CreateChildObjects(const Type::Ptr&)
|
||||
{
|
||||
/* Nothing to do here. */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ String Configuration::GetApiBindHost() const
|
|||
return Configuration::ApiBindHost;
|
||||
}
|
||||
|
||||
void Configuration::SetApiBindHost(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetApiBindHost(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ApiBindHost", &Configuration::ApiBindHost, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ String Configuration::GetApiBindPort() const
|
|||
return Configuration::ApiBindPort;
|
||||
}
|
||||
|
||||
void Configuration::SetApiBindPort(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetApiBindPort(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ApiBindPort", &Configuration::ApiBindPort, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ bool Configuration::GetAttachDebugger() const
|
|||
return Configuration::AttachDebugger;
|
||||
}
|
||||
|
||||
void Configuration::SetAttachDebugger(bool val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetAttachDebugger(bool val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("AttachDebugger", &Configuration::AttachDebugger, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ String Configuration::GetCacheDir() const
|
|||
return Configuration::CacheDir;
|
||||
}
|
||||
|
||||
void Configuration::SetCacheDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetCacheDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("CacheDir", &Configuration::CacheDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ int Configuration::GetConcurrency() const
|
|||
return Configuration::Concurrency;
|
||||
}
|
||||
|
||||
void Configuration::SetConcurrency(int val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetConcurrency(int val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("Concurrency", &Configuration::Concurrency, val, m_ReadOnly);
|
||||
Configuration::ConcurrencyWasModified = true;
|
||||
|
|
@ -123,7 +123,7 @@ String Configuration::GetConfigDir() const
|
|||
return Configuration::ConfigDir;
|
||||
}
|
||||
|
||||
void Configuration::SetConfigDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetConfigDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ConfigDir", &Configuration::ConfigDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ String Configuration::GetDataDir() const
|
|||
return Configuration::DataDir;
|
||||
}
|
||||
|
||||
void Configuration::SetDataDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetDataDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("DataDir", &Configuration::DataDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ String Configuration::GetEventEngine() const
|
|||
return Configuration::EventEngine;
|
||||
}
|
||||
|
||||
void Configuration::SetEventEngine(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetEventEngine(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("EventEngine", &Configuration::EventEngine, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ String Configuration::GetIncludeConfDir() const
|
|||
return Configuration::IncludeConfDir;
|
||||
}
|
||||
|
||||
void Configuration::SetIncludeConfDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetIncludeConfDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("IncludeConfDir", &Configuration::IncludeConfDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ String Configuration::GetInitRunDir() const
|
|||
return Configuration::InitRunDir;
|
||||
}
|
||||
|
||||
void Configuration::SetInitRunDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetInitRunDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("InitRunDir", &Configuration::InitRunDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ String Configuration::GetLogDir() const
|
|||
return Configuration::LogDir;
|
||||
}
|
||||
|
||||
void Configuration::SetLogDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetLogDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("LogDir", &Configuration::LogDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ String Configuration::GetModAttrPath() const
|
|||
return Configuration::ModAttrPath;
|
||||
}
|
||||
|
||||
void Configuration::SetModAttrPath(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetModAttrPath(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ModAttrPath", &Configuration::ModAttrPath, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ String Configuration::GetObjectsPath() const
|
|||
return Configuration::ObjectsPath;
|
||||
}
|
||||
|
||||
void Configuration::SetObjectsPath(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetObjectsPath(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ObjectsPath", &Configuration::ObjectsPath, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ String Configuration::GetPidPath() const
|
|||
return Configuration::PidPath;
|
||||
}
|
||||
|
||||
void Configuration::SetPidPath(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetPidPath(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("PidPath", &Configuration::PidPath, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ String Configuration::GetPkgDataDir() const
|
|||
return Configuration::PkgDataDir;
|
||||
}
|
||||
|
||||
void Configuration::SetPkgDataDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetPkgDataDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("PkgDataDir", &Configuration::PkgDataDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ String Configuration::GetPrefixDir() const
|
|||
return Configuration::PrefixDir;
|
||||
}
|
||||
|
||||
void Configuration::SetPrefixDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetPrefixDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("PrefixDir", &Configuration::PrefixDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ String Configuration::GetProgramData() const
|
|||
return Configuration::ProgramData;
|
||||
}
|
||||
|
||||
void Configuration::SetProgramData(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetProgramData(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ProgramData", &Configuration::ProgramData, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ int Configuration::GetRLimitFiles() const
|
|||
return Configuration::RLimitFiles;
|
||||
}
|
||||
|
||||
void Configuration::SetRLimitFiles(int val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRLimitFiles(int val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RLimitFiles", &Configuration::RLimitFiles, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ int Configuration::GetRLimitProcesses() const
|
|||
return RLimitProcesses;
|
||||
}
|
||||
|
||||
void Configuration::SetRLimitProcesses(int val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRLimitProcesses(int val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RLimitProcesses", &Configuration::RLimitProcesses, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -263,7 +263,7 @@ int Configuration::GetRLimitStack() const
|
|||
return Configuration::RLimitStack;
|
||||
}
|
||||
|
||||
void Configuration::SetRLimitStack(int val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRLimitStack(int val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RLimitStack", &Configuration::RLimitStack, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ String Configuration::GetRunAsGroup() const
|
|||
return Configuration::RunAsGroup;
|
||||
}
|
||||
|
||||
void Configuration::SetRunAsGroup(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRunAsGroup(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RunAsGroup", &Configuration::RunAsGroup, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -283,7 +283,7 @@ String Configuration::GetRunAsUser() const
|
|||
return Configuration::RunAsUser;
|
||||
}
|
||||
|
||||
void Configuration::SetRunAsUser(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRunAsUser(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RunAsUser", &Configuration::RunAsUser, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ String Configuration::GetSpoolDir() const
|
|||
return Configuration::SpoolDir;
|
||||
}
|
||||
|
||||
void Configuration::SetSpoolDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetSpoolDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("SpoolDir", &Configuration::SpoolDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -303,7 +303,7 @@ String Configuration::GetStatePath() const
|
|||
return Configuration::StatePath;
|
||||
}
|
||||
|
||||
void Configuration::SetStatePath(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetStatePath(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("StatePath", &Configuration::StatePath, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -313,7 +313,7 @@ double Configuration::GetTlsHandshakeTimeout() const
|
|||
return Configuration::TlsHandshakeTimeout;
|
||||
}
|
||||
|
||||
void Configuration::SetTlsHandshakeTimeout(double val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetTlsHandshakeTimeout(double val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("TlsHandshakeTimeout", &Configuration::TlsHandshakeTimeout, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ String Configuration::GetVarsPath() const
|
|||
return Configuration::VarsPath;
|
||||
}
|
||||
|
||||
void Configuration::SetVarsPath(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetVarsPath(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("VarsPath", &Configuration::VarsPath, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@ String Configuration::GetZonesDir() const
|
|||
return Configuration::ZonesDir;
|
||||
}
|
||||
|
||||
void Configuration::SetZonesDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetZonesDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("ZonesDir", &Configuration::ZonesDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -343,7 +343,7 @@ String Configuration::GetLocalStateDir() const
|
|||
return Configuration::LocalStateDir;
|
||||
}
|
||||
|
||||
void Configuration::SetLocalStateDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetLocalStateDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("LocalStateDir", &Configuration::LocalStateDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -353,7 +353,7 @@ String Configuration::GetSysconfDir() const
|
|||
return Configuration::SysconfDir;
|
||||
}
|
||||
|
||||
void Configuration::SetSysconfDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetSysconfDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("SysconfDir", &Configuration::SysconfDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ String Configuration::GetRunDir() const
|
|||
return Configuration::RunDir;
|
||||
}
|
||||
|
||||
void Configuration::SetRunDir(const String& val, bool suppress_events, const Value& cookie)
|
||||
void Configuration::SetRunDir(const String& val, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
HandleUserWrite("RunDir", &Configuration::RunDir, val, m_ReadOnly);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ IoEngine::IoEngine() : m_IoContext(), m_KeepAlive(boost::asio::make_work_guard(m
|
|||
|
||||
IoEngine::~IoEngine()
|
||||
{
|
||||
for (auto& thread : m_Threads) {
|
||||
for ([[maybe_unused]] auto& thread : m_Threads) {
|
||||
boost::asio::post(m_IoContext, []() {
|
||||
throw TerminateIoThread();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -150,22 +150,22 @@ void Object::SetFieldByName(const String& field, const Value& value, const Debug
|
|||
}
|
||||
}
|
||||
|
||||
void Object::Validate(int types, const ValidationUtils& utils)
|
||||
void Object::Validate([[maybe_unused]] int types, const ValidationUtils&)
|
||||
{
|
||||
/* Nothing to do here. */
|
||||
}
|
||||
|
||||
void Object::ValidateField(int id, const Lazy<Value>& lvalue, const ValidationUtils& utils)
|
||||
void Object::ValidateField([[maybe_unused]] int id, const Lazy<Value>&, const ValidationUtils&)
|
||||
{
|
||||
/* Nothing to do here. */
|
||||
}
|
||||
|
||||
void Object::NotifyField(int id, const Value& cookie)
|
||||
void Object::NotifyField([[maybe_unused]] int id, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
||||
}
|
||||
|
||||
Object::Ptr Object::NavigateField(int id) const
|
||||
Object::Ptr Object::NavigateField([[maybe_unused]] int id) const
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ void ScriptUtils::Assert(const Value& arg)
|
|||
BOOST_THROW_EXCEPTION(std::runtime_error("Assertion failed"));
|
||||
}
|
||||
|
||||
String ScriptUtils::MsiGetComponentPathShim(const String& component)
|
||||
String ScriptUtils::MsiGetComponentPathShim([[maybe_unused]] const String& component)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
TCHAR productCode[39];
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ int Type::GetActivationPriority() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Type::RegisterAttributeHandler(int fieldId, const AttributeHandler& callback)
|
||||
void Type::RegisterAttributeHandler([[maybe_unused]] int fieldId, const AttributeHandler&)
|
||||
{
|
||||
throw std::runtime_error("Invalid field ID.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ static void TypeRegisterAttributeHandler(const String& fieldName, const Function
|
|||
REQUIRE_NOT_NULL(self);
|
||||
|
||||
int fid = self->GetFieldId(fieldName);
|
||||
self->RegisterAttributeHandler(fid, [callback](const Object::Ptr& object, const Value& cookie) {
|
||||
self->RegisterAttributeHandler(fid, [callback](const Object::Ptr& object, [[maybe_unused]] const Value& cookie) {
|
||||
callback->Invoke({ object });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ static bool GlobHelper(const String& pathSpec, int type, std::vector<String>& fi
|
|||
#endif /* _WIN32 */
|
||||
|
||||
#ifndef _WIN32
|
||||
static int GlobErrorHandler(const char *epath, int eerrno)
|
||||
static int GlobErrorHandler([[maybe_unused]] const char *epath, int eerrno)
|
||||
{
|
||||
if (eerrno == ENOTDIR)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ImpersonationLevel ApiSetupCommand::GetImpersonationLevel() const
|
|||
}
|
||||
|
||||
void ApiSetupCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("cn", po::value<std::string>(), "The certificate's common name");
|
||||
|
|
@ -39,7 +39,7 @@ void ApiSetupCommand::InitParameters(boost::program_options::options_description
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int ApiSetupCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int ApiSetupCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
String cn;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ String CAListCommand::GetShortDescription() const
|
|||
* @param hiddenDesc Register hidden parameters.
|
||||
*/
|
||||
void CAListCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("all", "List all certificate signing requests, including signed. Note: Old requests are automatically cleaned by Icinga after 1 week.")
|
||||
|
|
@ -54,7 +54,7 @@ void CAListCommand::InitParameters(boost::program_options::options_description&
|
|||
*
|
||||
* @return An exit status.
|
||||
*/
|
||||
int CAListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int CAListCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
Dictionary::Ptr requests = PkiUtility::GetCertificateRequests(vm.count("removed"));
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ ImpersonationLevel CARemoveCommand::GetImpersonationLevel() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int CARemoveCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int CARemoveCommand::Run(const boost::program_options::variables_map&, const std::vector<std::string>& ap) const
|
||||
{
|
||||
String fingerPrint = ap[0];
|
||||
String requestFile = ApiListener::GetCertificateRequestsDir() + "/" + fingerPrint + ".json";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ ImpersonationLevel CARestoreCommand::GetImpersonationLevel() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int CARestoreCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int CARestoreCommand::Run(const boost::program_options::variables_map&, const std::vector<std::string>& ap) const
|
||||
{
|
||||
String fingerPrint = ap[0];
|
||||
String removedRequestFile = ApiListener::GetCertificateRequestsDir() + "/" + fingerPrint + ".removed";
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ ImpersonationLevel CASignCommand::GetImpersonationLevel() const
|
|||
*
|
||||
* @return An exit status.
|
||||
*/
|
||||
int CASignCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int CASignCommand::Run(const boost::program_options::variables_map&, const std::vector<std::string>& ap) const
|
||||
{
|
||||
String requestFile = ApiListener::GetCertificateRequestsDir() + "/" + ap[0] + ".json";
|
||||
|
||||
|
|
|
|||
|
|
@ -131,18 +131,18 @@ void CLICommand::Unregister(const std::vector<String>& name)
|
|||
GetRegistry().erase(name);
|
||||
}
|
||||
|
||||
std::vector<String> CLICommand::GetArgumentSuggestions(const String& argument, const String& word) const
|
||||
std::vector<String> CLICommand::GetArgumentSuggestions([[maybe_unused]] const String& argument, [[maybe_unused]] const String& word) const
|
||||
{
|
||||
return std::vector<String>();
|
||||
}
|
||||
|
||||
std::vector<String> CLICommand::GetPositionalSuggestions(const String& word) const
|
||||
std::vector<String> CLICommand::GetPositionalSuggestions([[maybe_unused]] const String& word) const
|
||||
{
|
||||
return std::vector<String>();
|
||||
}
|
||||
|
||||
void CLICommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
void CLICommand::InitParameters([[maybe_unused]] boost::program_options::options_description& visibleDesc,
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{ }
|
||||
|
||||
ImpersonationLevel CLICommand::GetImpersonationLevel() const
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ ImpersonationLevel ConsoleCommand::GetImpersonationLevel() const
|
|||
}
|
||||
|
||||
void ConsoleCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("connect,c", po::value<std::string>(), "connect to an Icinga 2 instance")
|
||||
|
|
@ -215,7 +215,7 @@ char *ConsoleCommand::ConsoleCompleteHelper(const char *word, int state)
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int ConsoleCommand::Run(const po::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int ConsoleCommand::Run(const po::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
#ifdef HAVE_EDITLINE
|
||||
rl_completion_entry_function = ConsoleCommand::ConsoleCompleteHelper;
|
||||
|
|
|
|||
|
|
@ -46,13 +46,18 @@ static po::variables_map g_AppParams;
|
|||
|
||||
REGISTER_CLICOMMAND("daemon", DaemonCommand);
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
static inline
|
||||
void NotifyStatus(const char* status)
|
||||
{
|
||||
#ifdef HAVE_SYSTEMD
|
||||
(void)sd_notifyf(0, "STATUS=%s", status);
|
||||
#endif /* HAVE_SYSTEMD */
|
||||
}
|
||||
#else /* HAVE_SYSTEMD */
|
||||
static inline
|
||||
void NotifyStatus(const char*)
|
||||
{
|
||||
}
|
||||
#endif /* HAVE_SYSTEMD */
|
||||
|
||||
/*
|
||||
* Daemonize(). On error, this function logs by itself and exits (i.e. does not return).
|
||||
|
|
@ -171,7 +176,7 @@ String DaemonCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void DaemonCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("config,c", po::value<std::vector<std::string> >(), "parse a configuration file")
|
||||
|
|
@ -614,7 +619,7 @@ public:
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int DaemonCommand::Run(const po::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int DaemonCommand::Run(const po::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SetConsoleOutputCP(65001);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ImpersonationLevel FeatureDisableCommand::GetImpersonationLevel() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int FeatureDisableCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int FeatureDisableCommand::Run(const boost::program_options::variables_map&, const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (ap.empty()) {
|
||||
Log(LogCritical, "cli", "Cannot disable feature(s). Name(s) are missing!");
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ImpersonationLevel FeatureEnableCommand::GetImpersonationLevel() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int FeatureEnableCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int FeatureEnableCommand::Run(const boost::program_options::variables_map&, const std::vector<std::string>& ap) const
|
||||
{
|
||||
return FeatureUtility::EnableFeatures(ap);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ String FeatureListCommand::GetShortDescription() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int FeatureListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int FeatureListCommand::Run(const boost::program_options::variables_map&, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
return FeatureUtility::ListFeatures();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ bool InternalSignalCommand::IsHidden() const
|
|||
}
|
||||
|
||||
void InternalSignalCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("pid,p", po::value<int>(), "Target PID")
|
||||
|
|
@ -43,7 +43,7 @@ void InternalSignalCommand::InitParameters(boost::program_options::options_descr
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int InternalSignalCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int InternalSignalCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
#ifndef _WIN32
|
||||
String signal = vm["sig"].as<String>();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int NodeWizardCommand::GetMaxArguments() const
|
|||
}
|
||||
|
||||
void NodeWizardCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("verbose", "increase log level");
|
||||
|
|
@ -59,7 +59,7 @@ void NodeWizardCommand::InitParameters(boost::program_options::options_descripti
|
|||
* @returns An exit status.
|
||||
*/
|
||||
int NodeWizardCommand::Run(const boost::program_options::variables_map& vm,
|
||||
const std::vector<std::string>& ap) const
|
||||
[[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("verbose"))
|
||||
Logger::SetConsoleLogSeverity(LogCritical);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ String ObjectListCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void ObjectListCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("count,c", "display object counts by types")
|
||||
|
|
@ -62,7 +62,7 @@ static time_t GetCtime(const String& path)
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int ObjectListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int ObjectListCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
String objectfile = Configuration::ObjectsPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ String PKINewCACommand::GetShortDescription() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKINewCACommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKINewCACommand::Run(const boost::program_options::variables_map&, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
return PkiUtility::NewCa();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ String PKINewCertCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void PKINewCertCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("cn", po::value<std::string>(), "Common Name")
|
||||
|
|
@ -42,7 +42,7 @@ std::vector<String> PKINewCertCommand::GetArgumentSuggestions(const String& argu
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKINewCertCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKINewCertCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("cn")) {
|
||||
Log(LogCritical, "cli", "Common name (--cn) must be specified.");
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ String PKIRequestCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void PKIRequestCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("key", po::value<std::string>(), "Key file path (input)")
|
||||
|
|
@ -51,7 +51,7 @@ std::vector<String> PKIRequestCommand::GetArgumentSuggestions(const String& argu
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKIRequestCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKIRequestCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("host")) {
|
||||
Log(LogCritical, "cli", "Icinga 2 host (--host) must be specified.");
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ std::vector<String> PKISaveCertCommand::GetArgumentSuggestions(const String& arg
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKISaveCertCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKISaveCertCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("host")) {
|
||||
Log(LogCritical, "cli", "Icinga 2 host (--host) must be specified.");
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ String PKISignCSRCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void PKISignCSRCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("csr", po::value<std::string>(), "CSR file path (input)")
|
||||
|
|
@ -40,7 +40,7 @@ std::vector<String> PKISignCSRCommand::GetArgumentSuggestions(const String& argu
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKISignCSRCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKISignCSRCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("csr")) {
|
||||
Log(LogCritical, "cli", "Certificate signing request file path (--csr) must be specified.");
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ String PKITicketCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void PKITicketCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("cn", po::value<std::string>(), "Certificate common name")
|
||||
|
|
@ -34,7 +34,7 @@ void PKITicketCommand::InitParameters(boost::program_options::options_descriptio
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKITicketCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKITicketCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
if (!vm.count("cn")) {
|
||||
Log(LogCritical, "cli", "Common name (--cn) must be specified.");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ String PKIVerifyCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void PKIVerifyCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("cn", po::value<std::string>(), "Common Name (optional). Use with '--cert' to check the CN in the certificate.")
|
||||
|
|
@ -45,7 +45,7 @@ std::vector<String> PKIVerifyCommand::GetArgumentSuggestions(const String& argum
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int PKIVerifyCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int PKIVerifyCommand::Run(const boost::program_options::variables_map& vm, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
String cn, certFile, caCertFile, crlFile;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ String VariableGetCommand::GetShortDescription() const
|
|||
}
|
||||
|
||||
void VariableGetCommand::InitParameters(boost::program_options::options_description& visibleDesc,
|
||||
boost::program_options::options_description& hiddenDesc) const
|
||||
[[maybe_unused]] boost::program_options::options_description& hiddenDesc) const
|
||||
{
|
||||
visibleDesc.add_options()
|
||||
("current", "Uses the current value (i.e. from the running process, rather than from the vars file)");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ String VariableListCommand::GetShortDescription() const
|
|||
*
|
||||
* @returns An exit status.
|
||||
*/
|
||||
int VariableListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
|
||||
int VariableListCommand::Run(const boost::program_options::variables_map&, [[maybe_unused]] const std::vector<std::string>& ap) const
|
||||
{
|
||||
String varsfile = Configuration::VarsPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ ExpressionResult Expression::Evaluate(ScriptFrame& frame, DebugHint *dhint) cons
|
|||
}
|
||||
}
|
||||
|
||||
bool Expression::GetReference(ScriptFrame& frame, bool init_dict, Value *parent, String *index, DebugHint **dhint) const
|
||||
bool Expression::GetReference(ScriptFrame&, [[maybe_unused]] bool init_dict, [[maybe_unused]] Value* parent, [[maybe_unused]] String* index, DebugHint**) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ LiteralExpression::LiteralExpression(Value value)
|
|||
: m_Value(std::move(value))
|
||||
{ }
|
||||
|
||||
ExpressionResult LiteralExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LiteralExpression::DoEvaluate(ScriptFrame&, DebugHint*) const
|
||||
{
|
||||
return m_Value;
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ VariableExpression::VariableExpression(String variable, std::vector<Expression::
|
|||
m_Imports.push_back(MakeIndexer(ScopeGlobal, "Icinga").release());
|
||||
}
|
||||
|
||||
ExpressionResult VariableExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult VariableExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
Value value;
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ ExpressionResult VariableExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
BOOST_THROW_EXCEPTION(ScriptError{"Tried to access undefined script variable '" + m_Variable + "'"});
|
||||
}
|
||||
|
||||
bool VariableExpression::GetReference(ScriptFrame& frame, bool init_dict, Value *parent, String *index, DebugHint **dhint) const
|
||||
bool VariableExpression::GetReference(ScriptFrame& frame, [[maybe_unused]] bool init_dict, Value *parent, String *index, DebugHint **dhint) const
|
||||
{
|
||||
*index = m_Variable;
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ ExpressionResult RefExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint)
|
|||
return new Reference(parent, index);
|
||||
}
|
||||
|
||||
ExpressionResult DerefExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult DerefExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand = m_Operand->Evaluate(frame);
|
||||
CHECK_RESULT(operand);
|
||||
|
|
@ -179,7 +179,7 @@ ExpressionResult DerefExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhin
|
|||
return ref->Get();
|
||||
}
|
||||
|
||||
bool DerefExpression::GetReference(ScriptFrame& frame, bool init_dict, Value *parent, String *index, DebugHint **dhint) const
|
||||
bool DerefExpression::GetReference(ScriptFrame& frame, [[maybe_unused]] bool init_dict, Value *parent, String *index, DebugHint**) const
|
||||
{
|
||||
ExpressionResult operand = m_Operand->Evaluate(frame);
|
||||
if (operand.GetCode() != ResultOK)
|
||||
|
|
@ -196,7 +196,7 @@ bool DerefExpression::GetReference(ScriptFrame& frame, bool init_dict, Value *pa
|
|||
return true;
|
||||
}
|
||||
|
||||
ExpressionResult NegateExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult NegateExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand = m_Operand->Evaluate(frame);
|
||||
CHECK_RESULT(operand);
|
||||
|
|
@ -204,7 +204,7 @@ ExpressionResult NegateExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhi
|
|||
return ~(long)operand.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult LogicalNegateExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LogicalNegateExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand = m_Operand->Evaluate(frame);
|
||||
CHECK_RESULT(operand);
|
||||
|
|
@ -212,7 +212,7 @@ ExpressionResult LogicalNegateExpression::DoEvaluate(ScriptFrame& frame, DebugHi
|
|||
return !operand.GetValue().ToBool();
|
||||
}
|
||||
|
||||
ExpressionResult AddExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult AddExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -223,7 +223,7 @@ ExpressionResult AddExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint)
|
|||
return operand1.GetValue() + operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult SubtractExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult SubtractExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -234,7 +234,7 @@ ExpressionResult SubtractExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
return operand1.GetValue() - operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult MultiplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult MultiplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -245,7 +245,7 @@ ExpressionResult MultiplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
return operand1.GetValue() * operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult DivideExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult DivideExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -256,7 +256,7 @@ ExpressionResult DivideExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhi
|
|||
return operand1.GetValue() / operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult ModuloExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ModuloExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -267,7 +267,7 @@ ExpressionResult ModuloExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhi
|
|||
return operand1.GetValue() % operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult XorExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult XorExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -278,7 +278,7 @@ ExpressionResult XorExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint)
|
|||
return operand1.GetValue() ^ operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult BinaryAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult BinaryAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -289,7 +289,7 @@ ExpressionResult BinaryAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint *
|
|||
return operand1.GetValue() & operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult BinaryOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult BinaryOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -300,7 +300,7 @@ ExpressionResult BinaryOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
return operand1.GetValue() | operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult ShiftLeftExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ShiftLeftExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -311,7 +311,7 @@ ExpressionResult ShiftLeftExpression::DoEvaluate(ScriptFrame& frame, DebugHint *
|
|||
return operand1.GetValue() << operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult ShiftRightExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ShiftRightExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -322,7 +322,7 @@ ExpressionResult ShiftRightExpression::DoEvaluate(ScriptFrame& frame, DebugHint
|
|||
return operand1.GetValue() >> operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult EqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult EqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -333,7 +333,7 @@ ExpressionResult EqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhin
|
|||
return operand1.GetValue() == operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult NotEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult NotEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -344,7 +344,7 @@ ExpressionResult NotEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
return operand1.GetValue() != operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult LessThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LessThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -355,7 +355,7 @@ ExpressionResult LessThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint *d
|
|||
return operand1.GetValue() < operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult GreaterThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult GreaterThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -366,7 +366,7 @@ ExpressionResult GreaterThanExpression::DoEvaluate(ScriptFrame& frame, DebugHint
|
|||
return operand1.GetValue() > operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult LessThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LessThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -377,7 +377,7 @@ ExpressionResult LessThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, Debug
|
|||
return operand1.GetValue() <= operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult GreaterThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult GreaterThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -388,7 +388,7 @@ ExpressionResult GreaterThanOrEqualExpression::DoEvaluate(ScriptFrame& frame, De
|
|||
return operand1.GetValue() >= operand2.GetValue();
|
||||
}
|
||||
|
||||
ExpressionResult InExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult InExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand2 = m_Operand2->Evaluate(frame);
|
||||
CHECK_RESULT(operand2);
|
||||
|
|
@ -405,7 +405,7 @@ ExpressionResult InExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint)
|
|||
return arr->Contains(operand1.GetValue());
|
||||
}
|
||||
|
||||
ExpressionResult NotInExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult NotInExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand2 = m_Operand2->Evaluate(frame);
|
||||
CHECK_RESULT(operand2);
|
||||
|
|
@ -422,7 +422,7 @@ ExpressionResult NotInExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhin
|
|||
return !arr->Contains(operand1.GetValue());
|
||||
}
|
||||
|
||||
ExpressionResult LogicalAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LogicalAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -437,7 +437,7 @@ ExpressionResult LogicalAndExpression::DoEvaluate(ScriptFrame& frame, DebugHint
|
|||
}
|
||||
}
|
||||
|
||||
ExpressionResult LogicalOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult LogicalOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand1 = m_Operand1->Evaluate(frame);
|
||||
CHECK_RESULT(operand1);
|
||||
|
|
@ -452,7 +452,7 @@ ExpressionResult LogicalOrExpression::DoEvaluate(ScriptFrame& frame, DebugHint *
|
|||
}
|
||||
}
|
||||
|
||||
ExpressionResult FunctionCallExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult FunctionCallExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
Value self, vfunc;
|
||||
String index;
|
||||
|
|
@ -499,7 +499,7 @@ ExpressionResult FunctionCallExpression::DoEvaluate(ScriptFrame& frame, DebugHin
|
|||
return VMOps::FunctionCall(self, func, arguments);
|
||||
}
|
||||
|
||||
ExpressionResult ArrayExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ArrayExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ArrayData result;
|
||||
result.reserve(m_Expressions.size());
|
||||
|
|
@ -545,7 +545,7 @@ ExpressionResult DictExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint
|
|||
}
|
||||
}
|
||||
|
||||
ExpressionResult GetScopeExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult GetScopeExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
if (m_ScopeSpec == ScopeLocal)
|
||||
return frame.Locals;
|
||||
|
|
@ -672,7 +672,7 @@ ExpressionResult SetExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint)
|
|||
return Empty;
|
||||
}
|
||||
|
||||
ExpressionResult SetConstExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult SetConstExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
auto globals = ScriptGlobal::GetGlobals();
|
||||
|
||||
|
|
@ -717,7 +717,7 @@ ExpressionResult WhileExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhin
|
|||
return Empty;
|
||||
}
|
||||
|
||||
ExpressionResult ReturnExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ReturnExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult operand = m_Operand->Evaluate(frame);
|
||||
CHECK_RESULT(operand);
|
||||
|
|
@ -725,12 +725,12 @@ ExpressionResult ReturnExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhi
|
|||
return ExpressionResult(operand.GetValue(), ResultReturn);
|
||||
}
|
||||
|
||||
ExpressionResult BreakExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult BreakExpression::DoEvaluate(ScriptFrame&, DebugHint*) const
|
||||
{
|
||||
return ExpressionResult(Empty, ResultBreak);
|
||||
}
|
||||
|
||||
ExpressionResult ContinueExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ContinueExpression::DoEvaluate(ScriptFrame&, DebugHint*) const
|
||||
{
|
||||
return ExpressionResult(Empty, ResultContinue);
|
||||
}
|
||||
|
|
@ -840,7 +840,7 @@ void icinga::BindToScope(std::unique_ptr<Expression>& expr, ScopeSpecifier scope
|
|||
}
|
||||
}
|
||||
|
||||
ExpressionResult ThrowExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ThrowExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ExpressionResult messageres = m_Message->Evaluate(frame);
|
||||
CHECK_RESULT(messageres);
|
||||
|
|
@ -898,12 +898,12 @@ ExpressionResult ImportDefaultTemplatesExpression::DoEvaluate(ScriptFrame& frame
|
|||
return Empty;
|
||||
}
|
||||
|
||||
ExpressionResult FunctionExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult FunctionExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
return VMOps::NewFunction(frame, m_Name, m_Args, m_ClosedVars, m_Expression);
|
||||
}
|
||||
|
||||
ExpressionResult ApplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult ApplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
if (frame.Sandboxed)
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Apply rules are not allowed in sandbox mode.", m_DebugInfo));
|
||||
|
|
@ -915,7 +915,7 @@ ExpressionResult ApplyExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhin
|
|||
m_Package, m_FKVar, m_FVVar, m_FTerm, m_ClosedVars, m_IgnoreOnError, m_Expression, m_DebugInfo);
|
||||
}
|
||||
|
||||
ExpressionResult NamespaceExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult NamespaceExpression::DoEvaluate(ScriptFrame&, DebugHint*) const
|
||||
{
|
||||
Namespace::Ptr ns = new Namespace(true);
|
||||
|
||||
|
|
@ -1042,7 +1042,7 @@ ExpressionResult IncludeExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dh
|
|||
return res;
|
||||
}
|
||||
|
||||
ExpressionResult BreakpointExpression::DoEvaluate(ScriptFrame& frame, DebugHint *dhint) const
|
||||
ExpressionResult BreakpointExpression::DoEvaluate(ScriptFrame& frame, DebugHint*) const
|
||||
{
|
||||
ScriptBreakpoint(frame, nullptr, GetDebugInfo());
|
||||
|
||||
|
|
|
|||
|
|
@ -588,16 +588,16 @@ Dictionary::Ptr ApiActions::RemoveDowntime(const ConfigObject::Ptr& object,
|
|||
}
|
||||
}
|
||||
|
||||
Dictionary::Ptr ApiActions::ShutdownProcess(const ConfigObject::Ptr& object,
|
||||
const Dictionary::Ptr& params)
|
||||
Dictionary::Ptr ApiActions::ShutdownProcess(const ConfigObject::Ptr&,
|
||||
[[maybe_unused]] const Dictionary::Ptr& params)
|
||||
{
|
||||
Application::RequestShutdown();
|
||||
|
||||
return ApiActions::CreateResult(200, "Shutting down Icinga 2.");
|
||||
}
|
||||
|
||||
Dictionary::Ptr ApiActions::RestartProcess(const ConfigObject::Ptr& object,
|
||||
const Dictionary::Ptr& params)
|
||||
Dictionary::Ptr ApiActions::RestartProcess(const ConfigObject::Ptr&,
|
||||
[[maybe_unused]] const Dictionary::Ptr& params)
|
||||
{
|
||||
Application::RequestRestart();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void ApiEvents::StaticInitialize()
|
|||
ConfigObject::OnVersionChanged.connect(&ApiEvents::OnVersionChangedHandler);
|
||||
}
|
||||
|
||||
void ApiEvents::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin)
|
||||
void ApiEvents::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("CheckResult");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::CheckResult));
|
||||
|
|
@ -68,7 +68,7 @@ void ApiEvents::CheckResultHandler(const Checkable::Ptr& checkable, const CheckR
|
|||
inboxes.Push(std::move(result));
|
||||
}
|
||||
|
||||
void ApiEvents::StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type, const MessageOrigin::Ptr& origin)
|
||||
void ApiEvents::StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("StateChange");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::StateChange));
|
||||
|
|
@ -106,7 +106,7 @@ void ApiEvents::StateChangeHandler(const Checkable::Ptr& checkable, const CheckR
|
|||
|
||||
void ApiEvents::NotificationSentToAllUsersHandler(const Notification::Ptr& notification,
|
||||
const Checkable::Ptr& checkable, const std::set<User::Ptr>& users, NotificationType type,
|
||||
const CheckResult::Ptr& cr, const String& author, const String& text, const MessageOrigin::Ptr& origin)
|
||||
const CheckResult::Ptr& cr, const String& author, const String& text, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Notification");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Notification));
|
||||
|
|
@ -152,7 +152,7 @@ void ApiEvents::NotificationSentToAllUsersHandler(const Notification::Ptr& notif
|
|||
inboxes.Push(std::move(result));
|
||||
}
|
||||
|
||||
void ApiEvents::FlappingChangedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr& origin)
|
||||
void ApiEvents::FlappingChangedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Flapping");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Flapping));
|
||||
|
|
@ -190,7 +190,7 @@ void ApiEvents::FlappingChangedHandler(const Checkable::Ptr& checkable, const Me
|
|||
|
||||
void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable,
|
||||
const String& author, const String& comment, AcknowledgementType type,
|
||||
bool notify, bool persistent, double, double expiry, const MessageOrigin::Ptr& origin)
|
||||
bool notify, bool persistent, double, double expiry, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("AcknowledgementSet");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::AcknowledgementSet));
|
||||
|
|
@ -229,7 +229,7 @@ void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable,
|
|||
inboxes.Push(std::move(result));
|
||||
}
|
||||
|
||||
void ApiEvents::AcknowledgementClearedHandler(const Checkable::Ptr& checkable, const String& removedBy, double, const MessageOrigin::Ptr& origin)
|
||||
void ApiEvents::AcknowledgementClearedHandler(const Checkable::Ptr& checkable, [[maybe_unused]] const String& removedBy, double, const MessageOrigin::Ptr&)
|
||||
{
|
||||
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("AcknowledgementCleared");
|
||||
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::AcknowledgementCleared));
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ std::pair<Dictionary::Ptr, Array::Ptr> CIB::GetFeatureStats()
|
|||
|
||||
REGISTER_STATSFUNCTION(CIB, &CIB::StatsFunc);
|
||||
|
||||
void CIB::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata) {
|
||||
void CIB::StatsFunc(const Dictionary::Ptr& status, [[maybe_unused]] const Array::Ptr& perfdata) {
|
||||
double interval = Utility::GetTime() - Application::GetStartTime();
|
||||
|
||||
if (interval > 60)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using namespace icinga;
|
|||
|
||||
REGISTER_TYPE(CustomVarObject);
|
||||
|
||||
void CustomVarObject::ValidateVars(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils)
|
||||
void CustomVarObject::ValidateVars(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils&)
|
||||
{
|
||||
MacroProcessor::ValidateCustomVars(this, lvalue());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ INITIALIZE_ONCE_WITH_PRIORITY([]() {
|
|||
|
||||
REGISTER_STATSFUNCTION(IcingaApplication, &IcingaApplication::StatsFunc);
|
||||
|
||||
void IcingaApplication::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||
void IcingaApplication::StatsFunc(const Dictionary::Ptr& status, [[maybe_unused]] const Array::Ptr& perfdata)
|
||||
{
|
||||
DictionaryData nodes;
|
||||
|
||||
|
|
@ -310,12 +310,12 @@ String IcingaApplication::GetEnvironment() const
|
|||
return Application::GetAppEnvironment();
|
||||
}
|
||||
|
||||
void IcingaApplication::SetEnvironment(const String& value, bool suppress_events, const Value& cookie)
|
||||
void IcingaApplication::SetEnvironment(const String& value, [[maybe_unused]] bool suppress_event, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
Application::SetAppEnvironment(value);
|
||||
}
|
||||
|
||||
void IcingaApplication::ValidateVars(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils)
|
||||
void IcingaApplication::ValidateVars(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils&)
|
||||
{
|
||||
MacroProcessor::ValidateCustomVars(this, lvalue());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ void IcingaDB::UpdateAllConfigObjects()
|
|||
|
||||
// enqueue a callback that will notify us once all previous queries were executed and wait for this event
|
||||
std::promise<void> p;
|
||||
m_Rcon->EnqueueCallback([&p](boost::asio::yield_context& yc) { p.set_value(); }, Prio::Config);
|
||||
m_Rcon->EnqueueCallback([&p](boost::asio::yield_context&) { p.set_value(); }, Prio::Config);
|
||||
p.get_future().wait();
|
||||
|
||||
auto endTime (Utility::GetTime());
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void IcingaDB::Start(bool runtimeCreated)
|
|||
GetEnableTls(), GetInsecureNoverify(), GetCertPath(), GetKeyPath(), GetCaPath(), GetCrlPath(),
|
||||
GetTlsProtocolmin(), GetCipherList(), GetConnectTimeout(), GetDebugInfo(), m_Rcon);
|
||||
|
||||
con->SetConnectedCallback([this, con](boost::asio::yield_context& yc) {
|
||||
con->SetConnectedCallback([this, con](boost::asio::yield_context&) {
|
||||
con->SetConnectedCallback(nullptr);
|
||||
|
||||
size_t pending = --m_PendingRcons;
|
||||
|
|
@ -110,7 +110,7 @@ void IcingaDB::Start(bool runtimeCreated)
|
|||
|
||||
m_PendingRcons = m_Rcons.size();
|
||||
|
||||
m_Rcon->SetConnectedCallback([this](boost::asio::yield_context& yc) {
|
||||
m_Rcon->SetConnectedCallback([this](boost::asio::yield_context&) {
|
||||
m_Rcon->SetConnectedCallback(nullptr);
|
||||
|
||||
for (auto& kv : m_Rcons) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using namespace icinga;
|
|||
|
||||
REGISTER_FUNCTION_NONCONST(Internal, NullEvent, &NullEventTask::ScriptFunc, "checkable:resolvedMacros:useResolvedMacros");
|
||||
|
||||
void NullEventTask::ScriptFunc(const Checkable::Ptr& checkable, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
|
||||
void NullEventTask::ScriptFunc(const Checkable::Ptr& checkable, [[maybe_unused]] const Dictionary::Ptr& resolvedMacros, [[maybe_unused]] bool useResolvedMacros)
|
||||
{
|
||||
REQUIRE_NOT_NULL(checkable);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ bool ActionsHandler::HandleRequest(
|
|||
const WaitGroup::Ptr& waitGroup,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ double ApiListener::GetTlsHandshakeTimeout() const
|
|||
return Configuration::TlsHandshakeTimeout;
|
||||
}
|
||||
|
||||
void ApiListener::SetTlsHandshakeTimeout(double value, bool suppress_events, const Value& cookie)
|
||||
void ApiListener::SetTlsHandshakeTimeout(double value, [[maybe_unused]] bool suppress_events, [[maybe_unused]] const Value& cookie)
|
||||
{
|
||||
Configuration::TlsHandshakeTimeout = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ bool ConfigPackagesHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ bool ConfigStagesHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ bool ConsoleHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ bool CreateObjectHandler::HandleRequest(
|
|||
const WaitGroup::Ptr& waitGroup,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ bool DeleteObjectHandler::HandleRequest(
|
|||
const WaitGroup::Ptr& waitGroup,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ bool InfoHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void JsonRpcConnection::HandleAndWriteHeartbeats(boost::asio::yield_context yc)
|
|||
}
|
||||
}
|
||||
|
||||
Value JsonRpcConnection::HeartbeatAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
|
||||
Value JsonRpcConnection::HeartbeatAPIHandler(const MessageOrigin::Ptr&, [[maybe_unused]] const Dictionary::Ptr& params)
|
||||
{
|
||||
return Empty;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ bool ModifyObjectHandler::HandleRequest(
|
|||
const WaitGroup::Ptr& waitGroup,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class StatusTargetProvider final : public TargetProvider
|
|||
public:
|
||||
DECLARE_PTR_TYPEDEFS(StatusTargetProvider);
|
||||
|
||||
void FindTargets(const String& type,
|
||||
void FindTargets([[maybe_unused]] const String& type,
|
||||
const std::function<void (const Value&)>& addTarget) const override
|
||||
{
|
||||
Namespace::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
|
||||
|
|
@ -29,7 +29,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Value GetTargetByName(const String& type, const String& name) const override
|
||||
Value GetTargetByName([[maybe_unused]] const String& type, const String& name) const override
|
||||
{
|
||||
Namespace::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ public:
|
|||
return type == "Status";
|
||||
}
|
||||
|
||||
String GetPluralName(const String& type) const override
|
||||
String GetPluralName([[maybe_unused]] const String& type) const override
|
||||
{
|
||||
return "statuses";
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ bool StatusHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ bool TemplateQueryHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TypeTargetProvider final : public TargetProvider
|
|||
public:
|
||||
DECLARE_PTR_TYPEDEFS(TypeTargetProvider);
|
||||
|
||||
void FindTargets(const String& type,
|
||||
void FindTargets([[maybe_unused]] const String& type,
|
||||
const std::function<void (const Value&)>& addTarget) const override
|
||||
{
|
||||
for (const Type::Ptr& target : Type::GetAllTypes()) {
|
||||
|
|
@ -25,7 +25,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Value GetTargetByName(const String& type, const String& name) const override
|
||||
Value GetTargetByName([[maybe_unused]] const String& type, const String& name) const override
|
||||
{
|
||||
Type::Ptr ptype = Type::GetByName(name);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ public:
|
|||
return type == "Type";
|
||||
}
|
||||
|
||||
String GetPluralName(const String& type) const override
|
||||
String GetPluralName([[maybe_unused]] const String& type) const override
|
||||
{
|
||||
return "types";
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ bool TypeQueryHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class VariableTargetProvider final : public TargetProvider
|
|||
public:
|
||||
DECLARE_PTR_TYPEDEFS(VariableTargetProvider);
|
||||
|
||||
void FindTargets(const String& type,
|
||||
void FindTargets([[maybe_unused]] const String& type,
|
||||
const std::function<void (const Value&)>& addTarget) const override
|
||||
{
|
||||
Namespace::Ptr globals = ScriptGlobal::GetGlobals();
|
||||
|
|
@ -39,7 +39,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Value GetTargetByName(const String& type, const String& name) const override
|
||||
Value GetTargetByName([[maybe_unused]] const String& type, const String& name) const override
|
||||
{
|
||||
if (name == "TicketSalt") {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument{"Access to TicketSalt via /v1/variables is not permitted."});
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
return type == "Variable";
|
||||
}
|
||||
|
||||
String GetPluralName(const String& type) const override
|
||||
String GetPluralName([[maybe_unused]] const String& type) const override
|
||||
{
|
||||
return "variables";
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ bool VariableQueryHandler::HandleRequest(
|
|||
const WaitGroup::Ptr&,
|
||||
const HttpApiRequest& request,
|
||||
HttpApiResponse& response,
|
||||
boost::asio::yield_context& yc
|
||||
boost::asio::yield_context&
|
||||
)
|
||||
{
|
||||
namespace http = boost::beast::http;
|
||||
|
|
|
|||
Loading…
Reference in a new issue