diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index 8546915c..43ffef6b 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -61,9 +61,9 @@ protected: size_t length = payload.size(); // limit to max int - if (length > std::numeric_limits::max()) + if (length > static_cast(std::numeric_limits::max())) { - length = std::numeric_limits::max(); + length = static_cast(std::numeric_limits::max()); } ::syslog(syslog_prio_from_level(msg), "%.*s", static_cast(length), payload.data());