]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use a consistent and more modern approach to not use a parameter.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 4 Oct 2015 18:45:00 +0000 (11:45 -0700)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Tue, 3 Nov 2015 18:16:23 +0000 (19:16 +0100)
A remarkably creative and diverse set of approaches to letting the
compiler know that opaque was being used when it wasn't is changed
by this commit to the more standard (void)opaque.

 Conflicts:
zutil.c

zutil.c

diff --git a/zutil.c b/zutil.c
index d9fda0983c3afefb7bbd1395ed9786dff9e26e9c..02b9ccfcd589b31049a0b9824cf3209c4e90ed2b 100644 (file)
--- a/zutil.c
+++ b/zutil.c
@@ -110,15 +110,15 @@ const char * ZEXPORT zError(int err)
 
 void ZLIB_INTERNAL *zcalloc (void *opaque, unsigned items, unsigned size)
 {
-    if (opaque) items += size - size; /* make compiler happy */
+    (void)opaque;
     return sizeof(uInt) > 2 ? (void *)malloc(items * size) :
                               (void *)calloc(items, size);
 }
 
 void ZLIB_INTERNAL zcfree (void *opaque, void *ptr)
 {
+    (void)opaque;
     free(ptr);
-    if (opaque) return; /* make compiler happy */
 }
 
 #endif /* MY_ZCALLOC */