From: Nathan Moinvaziri Date: Sun, 20 Mar 2022 02:41:24 +0000 (-0700) Subject: Fixed signed comparison warning in zng_calloc_aligned. X-Git-Tag: 2.1.0-beta1~302 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d955c068db33a51b1a7ab559b5dd882cbf42542a;p=thirdparty%2Fzlib-ng.git Fixed signed comparison warning in zng_calloc_aligned. zutil.c: In function ‘zng_calloc_aligned’: zutil.c:133:20: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘long unsigned int’ [-Wsign-compare] --- diff --git a/zutil.c b/zutil.c index c3ef19f5..2ca6aae4 100644 --- a/zutil.c +++ b/zutil.c @@ -114,7 +114,7 @@ void Z_INTERNAL zng_cfree(void *opaque, void *ptr) { * we have to ask for extra memory and return an aligned pointer. */ void Z_INTERNAL *zng_calloc_aligned(zng_calloc_func zalloc, void *opaque, unsigned items, unsigned size, unsigned align) { uintptr_t return_ptr, original_ptr; - int32_t alloc_size, align_diff; + uint32_t alloc_size, align_diff; void *ptr; /* If no custom calloc function used then call zlib-ng's aligned calloc */