]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix possible loss of data warning in benchmark_inflate on MSVC 2026
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 8 Jan 2026 18:31:35 +0000 (10:31 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 8 Jan 2026 23:26:41 +0000 (00:26 +0100)
benchmark_inflate.cc(131,51): warning C4267: '=': conversion from 'size_
t' to 'uint32_t', possible loss of dat

test/benchmarks/benchmark_inflate.cc

index 49b94e1902918b8b781087e0dadb4e3d87b3bf4f..5d0c7dba52678bea0bb1b276bead90470ee7ea9c 100644 (file)
@@ -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);