@@ -212,7 +212,11 @@ test_direct_chunk_write(hid_t file)
212212
213213 /* Perform compression from the source to the destination buffer */
214214#if defined(H5_HAVE_ZLIBNG_H )
215- ret = zng_compress2 (z_dst , & z_dst_nbytes , z_src , z_src_nbytes , aggression );
215+ {
216+ size_t z_dst_nbytes_sz = (size_t )z_dst_nbytes ;
217+ ret = zng_compress2 (z_dst , & z_dst_nbytes_sz , z_src , z_src_nbytes , aggression );
218+ z_dst_nbytes = (uLongf )z_dst_nbytes_sz ;
219+ }
216220#else
217221 ret = compress2 (z_dst , & z_dst_nbytes , z_src , z_src_nbytes , aggression );
218222#endif
@@ -295,7 +299,11 @@ test_direct_chunk_write(hid_t file)
295299
296300 /* Perform compression from the source to the destination buffer */
297301#if defined(H5_HAVE_ZLIBNG_H )
298- ret = zng_compress2 (z_dst , & z_dst_nbytes , z_src , z_src_nbytes , aggression );
302+ {
303+ size_t z_dst_nbytes_sz = (size_t )z_dst_nbytes ;
304+ ret = zng_compress2 (z_dst , & z_dst_nbytes_sz , z_src , z_src_nbytes , aggression );
305+ z_dst_nbytes = (uLongf )z_dst_nbytes_sz ;
306+ }
299307#else
300308 ret = compress2 (z_dst , & z_dst_nbytes , z_src , z_src_nbytes , aggression );
301309#endif
@@ -1686,7 +1694,10 @@ test_direct_chunk_read_no_cache(hid_t file)
16861694
16871695 /* Perform decompression from the source to the destination buffer */
16881696#if defined(H5_HAVE_ZLIBNG_H )
1689- ret = zng_uncompress (z_dst , & z_dst_nbytes , z_src , z_src_nbytes );
1697+ {
1698+ size_t z_dst_nbytes_sz = (size_t )z_dst_nbytes ;
1699+ ret = zng_uncompress (z_dst , & z_dst_nbytes_sz , z_src , z_src_nbytes );
1700+ }
16901701#else
16911702 ret = uncompress (z_dst , & z_dst_nbytes , z_src , z_src_nbytes );
16921703#endif
@@ -1892,7 +1903,10 @@ test_direct_chunk_read_cache(hid_t file, bool flush)
18921903
18931904 /* Perform decompression from the source to the destination buffer */
18941905#if defined(H5_HAVE_ZLIBNG_H )
1895- ret = zng_uncompress (z_dst , & z_dst_nbytes , z_src , z_src_nbytes );
1906+ {
1907+ size_t z_dst_nbytes_sz = (size_t )z_dst_nbytes ;
1908+ ret = zng_uncompress (z_dst , & z_dst_nbytes_sz , z_src , z_src_nbytes );
1909+ }
18961910#else
18971911 ret = uncompress (z_dst , & z_dst_nbytes , z_src , z_src_nbytes );
18981912#endif
0 commit comments