From 1e7e6c6424d05d5752c99c12329bb7363508cb3e Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Thu, 20 Jun 2024 19:29:53 +0800 Subject: [PATCH] fix: FTBFS when `UTP_DEBUG_LOGGING` is defined Left over from d9d3754ec093b2508d67d6893b3f288c0dbad778 and 4ed4d43c2bd532047c5d359589ce0630404bcb86. --- utp_internal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utp_internal.cpp b/utp_internal.cpp index f238939..314dd47 100644 --- a/utp_internal.cpp +++ b/utp_internal.cpp @@ -2926,14 +2926,14 @@ int utp_process_udp(utp_context *ctx, const byte *buffer, size_t len, const stru if (ctx->rst_info.size() > RST_INFO_LIMIT) { #if UTP_DEBUG_LOGGING - ctx->log(UTP_LOG_DEBUG, NULL, "recv not sending RST to non-SYN (limit at %u stored)", (uint)ctx->rst_info.GetCount()); + ctx->log(UTP_LOG_DEBUG, NULL, "recv not sending RST to non-SYN (limit at %tu stored)", std::size(ctx->rst_info)); #endif return 1; } #if UTP_DEBUG_LOGGING - ctx->log(UTP_LOG_DEBUG, NULL, "recv send RST to non-SYN (%u stored)", (uint)ctx->rst_info.GetCount()); + ctx->log(UTP_LOG_DEBUG, NULL, "recv send RST to non-SYN (%tu stored)", std::size(ctx->rst_info)); #endif ctx->rst_info.emplace_back(addr, id, seq_nr, ctx->current_ms); @@ -2960,7 +2960,7 @@ int utp_process_udp(utp_context *ctx, const byte *buffer, size_t len, const stru if (ctx->utp_sockets.size() > 3000) { #if UTP_DEBUG_LOGGING - ctx->log(UTP_LOG_DEBUG, NULL, "rejected incoming connection, too many uTP sockets %d", ctx->utp_sockets->GetCount()); + ctx->log(UTP_LOG_DEBUG, NULL, "rejected incoming connection, too many uTP sockets %tu", std::size(ctx->utp_sockets)); #endif return 1;