diff --git a/include/spdlog/sinks/systemd_sink.h b/include/spdlog/sinks/systemd_sink.h index ecc54a29..d6516890 100644 --- a/include/spdlog/sinks/systemd_sink.h +++ b/include/spdlog/sinks/systemd_sink.h @@ -46,9 +46,9 @@ protected: size_t length = msg.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()); } // Do not send source location if not available