mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 09:17:43 +02:00
Fix compiler warnings
This commit is contained in:
parent
8f2f9737d3
commit
5484ad23bb
@ -1932,7 +1932,7 @@ unsigned short GetPreviousState(const Checkable::Ptr& checkable, const Service::
|
|||||||
if (service) {
|
if (service) {
|
||||||
return phs;
|
return phs;
|
||||||
} else {
|
} else {
|
||||||
return phs == 99 ? phs : Host::CalculateState(ServiceState(phs));
|
return phs == 99 ? phs : (unsigned short)Host::CalculateState(ServiceState(phs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2061,7 +2061,7 @@ void IcingaDB::SendSentNotification(
|
|||||||
"host_id", GetObjectIdentifier(host),
|
"host_id", GetObjectIdentifier(host),
|
||||||
"type", Convert::ToString(type),
|
"type", Convert::ToString(type),
|
||||||
"state", Convert::ToString(cr ? service ? Convert::ToLong(cr->GetState()) : Convert::ToLong(Host::CalculateState(cr->GetState())) : 99),
|
"state", Convert::ToString(cr ? service ? Convert::ToLong(cr->GetState()) : Convert::ToLong(Host::CalculateState(cr->GetState())) : 99),
|
||||||
"previous_hard_state", Convert::ToString(cr ? Convert::ToLong(service ? cr->GetPreviousHardState() : Host::CalculateState(cr->GetPreviousHardState())) : 99),
|
"previous_hard_state", Convert::ToString(cr ? service ? Convert::ToLong(cr->GetPreviousHardState()) : Convert::ToLong(Host::CalculateState(cr->GetPreviousHardState())) : 99),
|
||||||
"author", Utility::ValidateUTF8(author),
|
"author", Utility::ValidateUTF8(author),
|
||||||
"text", Utility::ValidateUTF8(finalText),
|
"text", Utility::ValidateUTF8(finalText),
|
||||||
"users_notified", Convert::ToString(usersAmount),
|
"users_notified", Convert::ToString(usersAmount),
|
||||||
|
@ -224,7 +224,7 @@ void RedisConnection::EnqueueCallback(const std::function<void(boost::asio::yiel
|
|||||||
auto ctime (Utility::GetTime());
|
auto ctime (Utility::GetTime());
|
||||||
|
|
||||||
asio::post(m_Strand, [this, callback, priority, ctime]() {
|
asio::post(m_Strand, [this, callback, priority, ctime]() {
|
||||||
m_Queues.Writes[priority].emplace(WriteQueueItem{nullptr, nullptr, nullptr, nullptr, callback, ctime});
|
m_Queues.Writes[priority].emplace(WriteQueueItem{nullptr, nullptr, nullptr, nullptr, callback, ctime, QueryAffects{}});
|
||||||
m_QueuedWrites.Set();
|
m_QueuedWrites.Set();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user