Fix -Wenum-compare warnings

This commit is contained in:
Johannes Schmidt 2025-10-17 14:58:09 +02:00
parent 7b4697a237
commit 6bd89821cd

View file

@ -288,7 +288,7 @@ void GraphiteWriter::CheckResultHandler(const Checkable::Ptr& checkable, const C
std::vector<std::pair<String, double>> metadata;
if (GetEnableSendMetadata()) {
metadata = {
{"state", service ? service->GetState() : host->GetState()},
{"state", service ? static_cast<unsigned int>(service->GetState()) : static_cast<unsigned int>(host->GetState())},
{"current_attempt", checkable->GetCheckAttempt()},
{"max_check_attempts", checkable->GetMaxCheckAttempts()},
{"state_type", checkable->GetStateType()},