From a3232e6ef573b584f577e92dc0c79ef4be295dd2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 22 Sep 2019 18:21:12 +0200 Subject: [PATCH] zlib: protect CLEAR_HASH macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix compilation warning (and probably bug): deflate.c l608 some parts of macro expansion are not guarded by this ‘else’ clause --- common/zlib/deflate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/zlib/deflate.c b/common/zlib/deflate.c index f63751eed..a44bdb3ab 100644 --- a/common/zlib/deflate.c +++ b/common/zlib/deflate.c @@ -195,9 +195,10 @@ local const config configuration_table[10] = { * Initialize the hash table (avoiding 64K overflow for 16 bit systems). * prev[] will be initialized on the fly. */ -#define CLEAR_HASH(s) \ +#define CLEAR_HASH(s) {\ s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); \ +} /* =========================================================================== * Slide the hash table when sliding the window down (could be avoided with 32