Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package zlib-ng for openSUSE:Factory checked 
in at 2021-07-03 20:51:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zlib-ng (Old)
 and      /work/SRC/openSUSE:Factory/.zlib-ng.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zlib-ng"

Sat Jul  3 20:51:02 2021 rev:3 rq:903857 version:2.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/zlib-ng/zlib-ng.changes  2021-06-24 
18:22:41.660924214 +0200
+++ /work/SRC/openSUSE:Factory/.zlib-ng.new.2625/zlib-ng.changes        
2021-07-03 20:51:33.256443217 +0200
@@ -1,0 +2,7 @@
+Thu Jul  1 14:22:24 UTC 2021 - Ferdinand Thiessen <[email protected]>
+
+- Update to version 2.0.5
+  * Fix inflate corruption on aarch64
+  * Minor chunkset improvements
+
+-------------------------------------------------------------------

Old:
----
  zlib-ng-2.0.4.tar.gz

New:
----
  zlib-ng-2.0.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zlib-ng.spec ++++++
--- /var/tmp/diff_new_pack.CeaE2w/_old  2021-07-03 20:51:33.660440110 +0200
+++ /var/tmp/diff_new_pack.CeaE2w/_new  2021-07-03 20:51:33.664440080 +0200
@@ -1,5 +1,5 @@
 #
-# spec file
+# spec file for package zlib-ng
 #
 # Copyright (c) 2021 SUSE LLC
 #
@@ -31,7 +31,7 @@
 %endif
 
 Name:           zlib-ng%{?compat_suffix}
-Version:        2.0.4
+Version:        2.0.5
 Release:        0
 Summary:        Zlib replacement with SIMD optimizations
 License:        Zlib

++++++ zlib-ng-2.0.4.tar.gz -> zlib-ng-2.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/.github/workflows/pigz.yml 
new/zlib-ng-2.0.5/.github/workflows/pigz.yml
--- old/zlib-ng-2.0.4/.github/workflows/pigz.yml        2021-06-11 
21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/.github/workflows/pigz.yml        2021-06-25 
19:35:43.000000000 +0200
@@ -36,6 +36,14 @@
             codecov: ubuntu_clang_pigz_no_threads
             cmake-args: -DWITH_THREADS=OFF
 
+          - name: Ubuntu GCC AARCH64
+            os: ubuntu-latest
+            compiler: aarch64-linux-gnu-gcc
+            cmake-args: 
-DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain-aarch64.cmake
+            packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross
+            qemu-run: qemu-aarch64
+            codecov: ubuntu_gcc_pigz_aarch64
+
     steps:
     - name: Checkout repository
       uses: actions/checkout@v2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/CMakeLists.txt 
new/zlib-ng-2.0.5/CMakeLists.txt
--- old/zlib-ng-2.0.4/CMakeLists.txt    2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/CMakeLists.txt    2021-06-25 19:35:43.000000000 +0200
@@ -78,7 +78,6 @@
 add_option(ZLIB_COMPAT "Compile with zlib compatible API" OFF)
 add_option(ZLIB_ENABLE_TESTS "Build test binaries" ON)
 add_option(ZLIB_DUAL_LINK "Dual link tests against system zlib" OFF)
-add_option(WITH_SANITIZER "Build with sanitizer (Memory, Address, Undefined)" 
OFF)
 add_option(WITH_FUZZERS "Build test/fuzz" OFF)
 add_option(WITH_OPTIM "Build with optimisation" ON)
 add_option(WITH_NEW_STRATEGIES "Use new strategies" ON)
@@ -90,6 +89,10 @@
 add_option(WITH_INFLATE_ALLOW_INVALID_DIST "Build with zero fill for inflate 
invalid distances" OFF)
 add_option(WITH_UNALIGNED "Support unaligned reads on platforms that support 
it" ON)
 
+# Add multi-choice option
+set(WITH_SANITIZER AUTO CACHE STRING "Enable sanitizer support")
+set_property(CACHE WITH_SANITIZER PROPERTY STRINGS "Memory" "Address" 
"Undefined" "Thread")
+
 if(BASEARCH_ARM_FOUND)
     add_option(WITH_ACLE "Build with ACLE" ON)
     add_option(WITH_NEON "Build with NEON intrinsics" ON)
@@ -370,6 +373,8 @@
     add_address_sanitizer()
 elseif(WITH_SANITIZER STREQUAL "Memory")
     add_memory_sanitizer()
+elseif(WITH_SANITIZER STREQUAL "Thread")
+    add_thread_sanitizer()
 elseif(WITH_SANITIZER STREQUAL "Undefined")
     add_undefined_sanitizer()
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/Makefile.in 
new/zlib-ng-2.0.5/Makefile.in
--- old/zlib-ng-2.0.4/Makefile.in       2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/Makefile.in       2021-06-25 19:35:43.000000000 +0200
@@ -29,7 +29,7 @@
 LDSHARED=$(CC)
 LDSHAREDFLAGS=-shared
 
-VER=2.0.4
+VER=2.0.5
 VER1=2
 
 STATICLIB=$(LIBNAME1).a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/arch/arm/chunkset_neon.c 
new/zlib-ng-2.0.5/arch/arm/chunkset_neon.c
--- old/zlib-ng-2.0.4/arch/arm/chunkset_neon.c  2021-06-11 21:35:20.000000000 
+0200
+++ new/zlib-ng-2.0.5/arch/arm/chunkset_neon.c  2021-06-25 19:35:43.000000000 
+0200
@@ -13,6 +13,8 @@
 
 typedef uint8x16_t chunk_t;
 
+#define CHUNK_SIZE 16
+
 #define HAVE_CHUNKMEMSET_1
 #define HAVE_CHUNKMEMSET_2
 #define HAVE_CHUNKMEMSET_4
@@ -23,19 +25,21 @@
 }
 
 static inline void chunkmemset_2(uint8_t *from, chunk_t *chunk) {
-    int16_t tmp;
+    uint16_t tmp;
     memcpy(&tmp, from, 2);
-    *chunk = vreinterpretq_u8_s16(vdupq_n_s16(tmp));
+    *chunk = vreinterpretq_u8_u16(vdupq_n_u16(tmp));
 }
 
 static inline void chunkmemset_4(uint8_t *from, chunk_t *chunk) {
-    int32_t tmp;
+    uint32_t tmp;
     memcpy(&tmp, from, 4);
-    *chunk = vreinterpretq_u8_s32(vdupq_n_s32(tmp));
+    *chunk = vreinterpretq_u8_u32(vdupq_n_u32(tmp));
 }
 
 static inline void chunkmemset_8(uint8_t *from, chunk_t *chunk) {
-    *chunk = vcombine_u8(vld1_u8(from), vld1_u8(from));
+    uint64_t tmp;
+    memcpy(&tmp, from, 8);
+    *chunk = vreinterpretq_u8_u64(vdupq_n_u64(tmp));
 }
 
 #define CHUNKSIZE        chunksize_neon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/arch/x86/chunkset_avx.c 
new/zlib-ng-2.0.5/arch/x86/chunkset_avx.c
--- old/zlib-ng-2.0.4/arch/x86/chunkset_avx.c   2021-06-11 21:35:20.000000000 
+0200
+++ new/zlib-ng-2.0.5/arch/x86/chunkset_avx.c   2021-06-25 19:35:43.000000000 
+0200
@@ -9,6 +9,8 @@
 
 typedef __m256i chunk_t;
 
+#define CHUNK_SIZE 32
+
 #define HAVE_CHUNKMEMSET_1
 #define HAVE_CHUNKMEMSET_2
 #define HAVE_CHUNKMEMSET_4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/arch/x86/chunkset_sse.c 
new/zlib-ng-2.0.5/arch/x86/chunkset_sse.c
--- old/zlib-ng-2.0.4/arch/x86/chunkset_sse.c   2021-06-11 21:35:20.000000000 
+0200
+++ new/zlib-ng-2.0.5/arch/x86/chunkset_sse.c   2021-06-25 19:35:43.000000000 
+0200
@@ -10,6 +10,8 @@
 
 typedef __m128i chunk_t;
 
+#define CHUNK_SIZE 16
+
 #define HAVE_CHUNKMEMSET_1
 #define HAVE_CHUNKMEMSET_2
 #define HAVE_CHUNKMEMSET_4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/chunkset.c new/zlib-ng-2.0.5/chunkset.c
--- old/zlib-ng-2.0.4/chunkset.c        2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/chunkset.c        2021-06-25 19:35:43.000000000 +0200
@@ -14,6 +14,8 @@
 typedef struct chunk_t { uint8_t u8[8]; } chunk_t;
 #endif
 
+#define CHUNK_SIZE 8
+
 #define HAVE_CHUNKMEMSET_1
 #define HAVE_CHUNKMEMSET_4
 #define HAVE_CHUNKMEMSET_8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/chunkset_tpl.h 
new/zlib-ng-2.0.5/chunkset_tpl.h
--- old/zlib-ng-2.0.4/chunkset_tpl.h    2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/chunkset_tpl.h    2021-06-25 19:35:43.000000000 +0200
@@ -18,12 +18,13 @@
    without iteration, which will hopefully make the branch prediction more
    reliable. */
 Z_INTERNAL uint8_t* CHUNKCOPY(uint8_t *out, uint8_t const *from, unsigned len) 
{
+    Assert(len > 0, "chunkcopy should never have a length 0");
     chunk_t chunk;
-    --len;
+    int32_t align = (--len % sizeof(chunk_t)) + 1;
     loadchunk(from, &chunk);
     storechunk(out, &chunk);
-    out += (len % sizeof(chunk_t)) + 1;
-    from += (len % sizeof(chunk_t)) + 1;
+    out += align;
+    from += align;
     len /= sizeof(chunk_t);
     while (len > 0) {
         loadchunk(from, &chunk);
@@ -37,35 +38,48 @@
 
 /* Behave like chunkcopy, but avoid writing beyond of legal output. */
 Z_INTERNAL uint8_t* CHUNKCOPY_SAFE(uint8_t *out, uint8_t const *from, unsigned 
len, uint8_t *safe) {
-    len = MIN(len, safe - out + 1);
-    if (len < sizeof(chunk_t)) {
-        int32_t use_chunk16 = sizeof(chunk_t) > 16 && (len & 16);
-        if (use_chunk16) {
-            memcpy(out, from, 16);
-            out += 16;
-            from += 16;
-        }
-        if (len & 8) {
-            memcpy(out, from, 8);
-            out += 8;
-            from += 8;
-        }
-        if (len & 4) {
-            memcpy(out, from, 4);
-            out += 4;
-            from += 4;
-        }
-        if (len & 2) {
-            memcpy(out, from, 2);
-            out += 2;
-            from += 2;
-        }
-        if (len & 1) {
-            *out++ = *from++;
-        }
-        return out;
+    unsigned safelen = (unsigned)((safe - out) + 1);
+    len = MIN(len, safelen);
+#if CHUNK_SIZE >= 32
+    while (len >= 32) {
+        memcpy(out, from, 32);
+        out += 32;
+        from += 32;
+        len -= 32;
+    }
+#endif
+#if CHUNK_SIZE >= 16
+    while (len >= 16) {
+        memcpy(out, from, 16);
+        out += 16;
+        from += 16;
+        len -= 16;
+    }
+#endif
+#if CHUNK_SIZE >= 8
+    while (len >= 8) {
+        memcpy(out, from, 8);
+        out += 8;
+        from += 8;
+        len -= 8;
+    }
+#endif
+    if (len >= 4) {
+        memcpy(out, from, 4);
+        out += 4;
+        from += 4;
+        len -= 4;
+    }
+    if (len >= 2) {
+        memcpy(out, from, 2);
+        out += 2;
+        from += 2;
+        len -= 2;
+    }
+    if (len == 1) {
+        *out++ = *from++;
     }
-    return CHUNKCOPY(out, from, len);
+    return out;
 }
 
 /* Perform short copies until distance can be rewritten as being at least
@@ -94,7 +108,7 @@
 Z_INTERNAL uint8_t* CHUNKMEMSET(uint8_t *out, unsigned dist, unsigned len) {
     /* Debug performance related issues when len < sizeof(uint64_t):
        Assert(len >= sizeof(uint64_t), "chunkmemset should be called on larger 
chunks"); */
-    Assert(dist > 0, "cannot have a distance 0");
+    Assert(dist > 0, "chunkmemset cannot have a distance 0");
 
     unsigned char *from = out - dist;
     chunk_t chunk;
@@ -153,9 +167,10 @@
     }
 
     /* Last, deal with the case when LEN is not a multiple of SZ. */
-    if (rem)
+    if (rem) {
         memcpy(out, from, rem);
-    out += rem;
+        out += rem;
+    }
 
     return out;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/cmake/detect-sanitizer.cmake 
new/zlib-ng-2.0.5/cmake/detect-sanitizer.cmake
--- old/zlib-ng-2.0.4/cmake/detect-sanitizer.cmake      2021-06-11 
21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/cmake/detect-sanitizer.cmake      2021-06-25 
19:35:43.000000000 +0200
@@ -69,6 +69,16 @@
     endif()
 endmacro()
 
+macro(add_thread_sanitizer)
+    check_sanitizer_support("thread" supported_checks)
+    if(NOT ${supported_checks} STREQUAL "")
+        message(STATUS "Thread sanitizer is enabled: ${supported_checks}")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${supported_checks}")
+    else()
+        message(STATUS "Thread sanitizer is not supported")
+    endif()
+endmacro()
+
 macro(add_undefined_sanitizer)
     set(known_checks
         array-bounds
@@ -120,4 +130,4 @@
     else()
         message(STATUS "UNdefined behavior sanitizer is not supported")
     endif()
-endmacro()
\ No newline at end of file
+endmacro()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/deflate.h new/zlib-ng-2.0.5/deflate.h
--- old/zlib-ng-2.0.4/deflate.h 2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/deflate.h 2021-06-25 19:35:43.000000000 +0200
@@ -402,9 +402,9 @@
 #  define sent_bits_add(s, bits)    s->bits_sent += (bits)
 #  define sent_bits_align(s)        s->bits_sent = (s->bits_sent + 7) & ~7L
 #else
-#  define cmpr_bits_add(s, len)     (void)(len)
+#  define cmpr_bits_add(s, len)     Z_UNUSED(len)
 #  define cmpr_bits_align(s)
-#  define sent_bits_add(s, bits)    (void)(bits)
+#  define sent_bits_add(s, bits)    Z_UNUSED(bits)
 #  define sent_bits_align(s)
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/functable.c 
new/zlib-ng-2.0.5/functable.c
--- old/zlib-ng-2.0.4/functable.c       2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/functable.c       2021-06-25 19:35:43.000000000 +0200
@@ -241,6 +241,7 @@
 Z_INTERNAL uint32_t chunksize_stub(void) {
     // Initialize default
     functable.chunksize = &chunksize_c;
+    cpu_check_features();
 
 #ifdef X86_SSE2_CHUNKSET
 # if !defined(__x86_64__) && !defined(_M_X64) && !defined(X86_NOCHECK_SSE2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/inffast.c new/zlib-ng-2.0.5/inffast.c
--- old/zlib-ng-2.0.4/inffast.c 2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/inffast.c 2021-06-25 19:35:43.000000000 +0200
@@ -128,6 +128,7 @@
     unsigned len;               /* match length, unused bytes */
     unsigned dist;              /* match distance */
     unsigned char *from;        /* where to copy match from */
+    unsigned extra_safe;        /* copy chunks safely in all cases */
 
     /* copy state to local variables */
     state = (struct inflate_state *)strm->state;
@@ -151,6 +152,11 @@
     lmask = (1U << state->lenbits) - 1;
     dmask = (1U << state->distbits) - 1;
 
+    /* Detect if out and window point to the same memory allocation. In this 
instance it is 
+       necessary to use safe chunk copy functions to prevent overwriting the 
window. If the 
+       window is overwritten then future matches with far distances will fail 
to copy correctly. */
+    extra_safe = (out >= window && out + INFLATE_FAST_MIN_LEFT <= window + 
wsize);
+
     /* decode literals and length/distances until end-of-block or not enough
        input data or output space */
     do {
@@ -259,12 +265,22 @@
                     } else {
                         out = functable.chunkcopy_safe(out, from, len, safe);
                     }
-                } else {
+                } else if (extra_safe) {
                     /* Whole reference is in range of current output. */
                     if (dist >= len || dist >= state->chunksize)
                         out = functable.chunkcopy_safe(out, out - dist, len, 
safe);
                     else
-                        out = functable.chunkmemset_safe(out, dist, len, safe 
- out + 1);
+                        out = functable.chunkmemset_safe(out, dist, len, 
(unsigned)((safe - out) + 1));
+                } else {
+                    /* Whole reference is in range of current output.  No 
range checks are
+                       necessary because we start with room for at least 258 
bytes of output,
+                       so unroll and roundoff operations can write beyond 
`out+len` so long
+                       as they stay within 258 bytes of `out`.
+                    */
+                    if (dist >= len || dist >= state->chunksize)
+                        out = functable.chunkcopy(out, out - dist, len);
+                    else
+                        out = functable.chunkmemset(out, dist, len);
                 }
             } else if ((op & 64) == 0) {          /* 2nd level distance code */
                 here = dcode + here->val + BITS(op);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/inflate.c new/zlib-ng-2.0.5/inflate.c
--- old/zlib-ng-2.0.4/inflate.c 2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/inflate.c 2021-06-25 19:35:43.000000000 +0200
@@ -1289,7 +1289,7 @@
     state->sane = !subvert;
     return Z_OK;
 #else
-    (void)subvert;
+    Z_UNUSED(subvert);
     state->sane = 1;
     return Z_DATA_ERROR;
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/test/example.c 
new/zlib-ng-2.0.5/test/example.c
--- old/zlib-ng-2.0.4/test/example.c    2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/test/example.c    2021-06-25 19:35:43.000000000 +0200
@@ -229,7 +229,7 @@
         fprintf(stderr, "gzclose unexpected return when handle null\n");
         exit(1);
     }
-    (void)read;
+    Z_UNUSED(read);
 #endif
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/test/fuzz/checksum_fuzzer.c 
new/zlib-ng-2.0.5/test/fuzz/checksum_fuzzer.c
--- old/zlib-ng-2.0.4/test/fuzz/checksum_fuzzer.c       2021-06-11 
21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/test/fuzz/checksum_fuzzer.c       2021-06-25 
19:35:43.000000000 +0200
@@ -42,16 +42,16 @@
         uint32_t crc4 = PREFIX(crc32_combine_op)(crc1, crc3, op);
         crc1 = PREFIX(crc32_z)(crc1, data + offset, buffSize);
         assert(crc1 == crc4);
-        (void)crc1;
-        (void)crc4;
+        Z_UNUSED(crc1);
+        Z_UNUSED(crc4);
     }
     crc1 = PREFIX(crc32_z)(crc1, data + offset, dataLen % buffSize);
 
     crc2 = PREFIX(crc32_z)(crc2, data, dataLen);
 
     assert(crc1 == crc2);
-    (void)crc1;
-    (void)crc2;
+    Z_UNUSED(crc1);
+    Z_UNUSED(crc2);
     combine1 = PREFIX(crc32_combine)(crc1, crc2, (z_off_t)dataLen);
     combine2 = PREFIX(crc32_combine)(crc1, crc1, (z_off_t)dataLen);
     assert(combine1 == combine2);
@@ -73,13 +73,13 @@
     adler2 = PREFIX(adler32_z)(adler2, data, dataLen);
 
     assert(adler1 == adler2);
-    (void)adler1;
-    (void)adler2;
+    Z_UNUSED(adler1);
+    Z_UNUSED(adler2);
     combine1 = PREFIX(adler32_combine)(adler1, adler2, (z_off_t)dataLen);
     combine2 = PREFIX(adler32_combine)(adler1, adler1, (z_off_t)dataLen);
     assert(combine1 == combine2);
-    (void)combine1;
-    (void)combine2;
+    Z_UNUSED(combine1);
+    Z_UNUSED(combine2);
 
     /* This function must return 0. */
     return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zlib-ng-2.0.4/test/fuzz/standalone_fuzz_target_runner.c 
new/zlib-ng-2.0.5/test/fuzz/standalone_fuzz_target_runner.c
--- old/zlib-ng-2.0.4/test/fuzz/standalone_fuzz_target_runner.c 2021-06-11 
21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/test/fuzz/standalone_fuzz_target_runner.c 2021-06-25 
19:35:43.000000000 +0200
@@ -2,6 +2,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "zbuild.h"
+
 extern int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size);
 
 int main(int argc, char **argv) {
@@ -28,7 +30,7 @@
         free(buf);
         err = fclose(f);
         assert(err == 0);
-        (void)err;
+        Z_UNUSED(err);
         fprintf(stderr, "Done:    %s: (%d bytes)\n", argv[i], (int)n_read);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/test/hash_head_0.c 
new/zlib-ng-2.0.5/test/hash_head_0.c
--- old/zlib-ng-2.0.4/test/hash_head_0.c        2021-06-11 21:35:20.000000000 
+0200
+++ new/zlib-ng-2.0.5/test/hash_head_0.c        2021-06-25 19:35:43.000000000 
+0200
@@ -63,14 +63,14 @@
         return EXIT_FAILURE;
     }
 
-    strm.avail_in = next_in + sizeof(next_in) - strm.next_in;
-    strm.avail_out = next_out + sizeof(next_out) - strm.next_out;
+    strm.avail_in = (uint32_t)(next_in + sizeof(next_in) - strm.next_in);
+    strm.avail_out = (uint32_t)(next_out + sizeof(next_out) - strm.next_out);
     ret = PREFIX(deflate)(&strm, Z_FINISH);
     if (ret != Z_STREAM_END) {
         fprintf(stderr, "deflate() failed with code %d\n", ret);
         return EXIT_FAILURE;
     }
-    uint32_t compressed_size = strm.next_out - next_out;
+    uint32_t compressed_size = (uint32_t)(strm.next_out - next_out);
 
     ret = PREFIX(deflateEnd)(&strm);
     if (ret != Z_OK) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/test/infcover.c 
new/zlib-ng-2.0.5/test/infcover.c
--- old/zlib-ng-2.0.4/test/infcover.c   2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/test/infcover.c   2021-06-25 19:35:43.000000000 +0200
@@ -348,7 +348,7 @@
     ret = PREFIX(inflateReset2)(&strm, -8);     assert(ret == Z_OK);
     ret = PREFIX(inflateEnd)(&strm);            assert(ret == Z_OK);
     mem_done(&strm, what);
-    (void)err;
+    Z_UNUSED(err);
 }
 
 /* cover all of the lines in inflate.c up to inflate() */
@@ -386,7 +386,7 @@
     ret = PREFIX(inflateInit)(&strm);           assert(ret == Z_OK);
     ret = PREFIX(inflateEnd)(&strm);            assert(ret == Z_OK);
     fputs("inflate built-in memory routines\n", stderr);
-    (void)ret;
+    Z_UNUSED(ret);
 }
 
 /* cover all inflate() header and trailer cases and code after inflate() */
@@ -470,7 +470,7 @@
 
 static int push(void *desc, unsigned char *buf, unsigned len) {
     buf += len;
-    (void)buf;
+    Z_UNUSED(buf);
     return desc != NULL;        /* force error if desc not null */
 }
 
@@ -511,7 +511,7 @@
                                                 assert(ret == Z_OK);
     ret = PREFIX(inflateBackEnd)(&strm);        assert(ret == Z_OK);
     fputs("inflateBack built-in memory routines\n", stderr);
-    (void)ret;
+    Z_UNUSED(ret);
 }
 
 /* do a raw inflate of data in hexadecimal with both inflate and inflateBack */
@@ -647,7 +647,7 @@
     ret = zng_inflate_table(DISTS, lens, 16, &next, &bits, work);
                                                 assert(ret == 1);
     fputs("inflate_table not enough errors\n", stderr);
-    (void)ret;
+    Z_UNUSED(ret);
 }
 
 /* cover remaining inffast.c decoding and window copying */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/trees_emit.h 
new/zlib-ng-2.0.5/trees_emit.h
--- old/zlib-ng-2.0.4/trees_emit.h      2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/trees_emit.h      2021-06-25 19:35:43.000000000 +0200
@@ -175,7 +175,7 @@
     s->bi_buf = bi_buf;
     Tracev((stderr, "\n+++ Emit End Block: Last: %u Pending: %u Total Out: %" 
PRIu64 "\n",
         last, s->pending, (uint64_t)s->strm->total_out));
-    (void)last;
+    Z_UNUSED(last);
 }
 
 /* ===========================================================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/win32/Makefile.msc 
new/zlib-ng-2.0.5/win32/Makefile.msc
--- old/zlib-ng-2.0.4/win32/Makefile.msc        2021-06-11 21:35:20.000000000 
+0200
+++ new/zlib-ng-2.0.5/win32/Makefile.msc        2021-06-25 19:35:43.000000000 
+0200
@@ -111,7 +111,7 @@
 
 $(SHAREDLIB): zconf $(TOP)/win32/$(DEFFILE) $(OBJS) $(RESFILE)
        $(LD) $(LDFLAGS) -def:$(TOP)/win32/$(DEFFILE) -dll -implib:$(IMPLIB) \
-         -out:$@ -base:0x5A4C0000 $(OBJS) $(RESFILE)
+         -out:$@ $(OBJS) $(RESFILE)
        if exist [email protected] \
          mt -nologo -manifest [email protected] -outputresource:$@;2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/zbuild.h new/zlib-ng-2.0.5/zbuild.h
--- old/zlib-ng-2.0.4/zbuild.h  2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/zbuild.h  2021-06-25 19:35:43.000000000 +0200
@@ -28,5 +28,9 @@
 
 /* Minimum of a and b. */
 #define MIN(a, b) ((a) > (b) ? (b) : (a))
+/* Maximum of a and b. */
+#define MAX(a, b) ((a) < (b) ? (b) : (a))
+/* Ignore unused variable warning */
+#define Z_UNUSED(var) (void)(var)
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/zlib-ng.h new/zlib-ng-2.0.5/zlib-ng.h
--- old/zlib-ng-2.0.4/zlib-ng.h 2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/zlib-ng.h 2021-06-25 19:35:43.000000000 +0200
@@ -44,11 +44,11 @@
 extern "C" {
 #endif
 
-#define ZLIBNG_VERSION "2.0.4"
-#define ZLIBNG_VERNUM 0x2040
+#define ZLIBNG_VERSION "2.0.5"
+#define ZLIBNG_VERNUM 0x2050
 #define ZLIBNG_VER_MAJOR 2
 #define ZLIBNG_VER_MINOR 0
-#define ZLIBNG_VER_REVISION 4
+#define ZLIBNG_VER_REVISION 5
 #define ZLIBNG_VER_SUBREVISION 0
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/zlib.h new/zlib-ng-2.0.5/zlib.h
--- old/zlib-ng-2.0.4/zlib.h    2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/zlib.h    2021-06-25 19:35:43.000000000 +0200
@@ -46,11 +46,11 @@
 extern "C" {
 #endif
 
-#define ZLIBNG_VERSION "2.0.4"
-#define ZLIBNG_VERNUM 0x2040
+#define ZLIBNG_VERSION "2.0.5"
+#define ZLIBNG_VERNUM 0x2050
 #define ZLIBNG_VER_MAJOR 2
 #define ZLIBNG_VER_MINOR 0
-#define ZLIBNG_VER_REVISION 4
+#define ZLIBNG_VER_REVISION 5
 #define ZLIBNG_VER_SUBREVISION 0
 
 #define ZLIB_VERSION "1.2.11.zlib-ng"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-ng-2.0.4/zutil.c new/zlib-ng-2.0.5/zutil.c
--- old/zlib-ng-2.0.4/zutil.c   2021-06-11 21:35:20.000000000 +0200
+++ new/zlib-ng-2.0.5/zutil.c   2021-06-25 19:35:43.000000000 +0200
@@ -21,7 +21,7 @@
 };
 
 const char zlibng_string[] =
-    " zlib-ng 2.0.4 forked from zlib";
+    " zlib-ng 2.0.5 forked from zlib";
 
 #ifdef ZLIB_COMPAT
 const char * Z_EXPORT zlibVersion(void) {
@@ -101,11 +101,11 @@
 }
 
 void Z_INTERNAL *zng_calloc(void *opaque, unsigned items, unsigned size) {
-    (void)opaque;
+    Z_UNUSED(opaque);
     return zng_alloc((size_t)items * (size_t)size);
 }
 
 void Z_INTERNAL zng_cfree(void *opaque, void *ptr) {
-    (void)opaque;
+    Z_UNUSED(opaque);
     zng_free(ptr);
 }

Reply via email to