From: Nathan Moinvaziri Date: Thu, 8 Jan 2026 18:31:35 +0000 (-0800) Subject: Fix possible loss of data warning in benchmark_inflate on MSVC 2026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=160d786cb664bee46bdf48e7dfecba1a0197d89b;p=thirdparty%2Fzlib-ng.git Fix possible loss of data warning in benchmark_inflate on MSVC 2026 benchmark_inflate.cc(131,51): warning C4267: '=': conversion from 'size_ t' to 'uint32_t', possible loss of dat --- diff --git a/test/benchmarks/benchmark_inflate.cc b/test/benchmarks/benchmark_inflate.cc index 49b94e190..5d0c7dba5 100644 --- a/test/benchmarks/benchmark_inflate.cc +++ b/test/benchmarks/benchmark_inflate.cc @@ -128,10 +128,10 @@ public: return; } - strm.avail_in = compressed_sizes[index]; // Size of the input - strm.next_in = compressed_buff[index]; // Pointer to the compressed data - strm.avail_out = MAX_SIZE; // Max size for output - strm.next_out = outbuff; // Output buffer + strm.avail_in = (uint32_t)compressed_sizes[index]; // Size of the input + strm.next_in = compressed_buff[index]; // Pointer to the compressed data + strm.avail_out = MAX_SIZE; // Max size for output + strm.next_out = outbuff; // Output buffer // Perform decompression err = PREFIX(inflate)(&strm, Z_FINISH);