From 5484ad23bb8b0744f5ad2586b4df7bdfef9ac86d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 24 Mar 2023 18:08:20 +0100 Subject: [PATCH] Fix compiler warnings --- lib/icingadb/icingadb-objects.cpp | 4 ++-- lib/icingadb/redisconnection.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index f3748728d..bebf32a4f 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -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), diff --git a/lib/icingadb/redisconnection.cpp b/lib/icingadb/redisconnection.cpp index 468c839a9..fe8d1d0f7 100644 --- a/lib/icingadb/redisconnection.cpp +++ b/lib/icingadb/redisconnection.cpp @@ -224,7 +224,7 @@ void RedisConnection::EnqueueCallback(const std::function