Fix compiler warnings

This commit is contained in:
Alexander A. Klimov 2023-03-24 18:08:20 +01:00
parent 8f2f9737d3
commit 5484ad23bb
2 changed files with 3 additions and 3 deletions

View File

@ -1932,7 +1932,7 @@ unsigned short GetPreviousState(const Checkable::Ptr& checkable, const Service::
if (service) {
return phs;
} 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),
"type", Convert::ToString(type),
"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),
"text", Utility::ValidateUTF8(finalText),
"users_notified", Convert::ToString(usersAmount),

View File

@ -224,7 +224,7 @@ void RedisConnection::EnqueueCallback(const std::function<void(boost::asio::yiel
auto ctime (Utility::GetTime());
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();
});
}