zlib: protect CLEAR_HASH macro

Fix compilation warning (and probably bug):
  deflate.c l608
  some parts of macro expansion are not guarded by this ‘else’ clause
This commit is contained in:
Philippe Teuwen 2019-09-22 18:21:12 +02:00
parent 26ccdf5ce2
commit a3232e6ef5

View file

@ -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