From e9e6607fc9ae827bcc67b670847d2a094e88c23f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 12 Aug 2021 19:00:59 +0200 Subject: [PATCH] (libz) Clang does not like this at all - warning: possible misuse of comma operator here [-Wcomma] --- deps/libz/deflate.c | 6 ++++-- deps/libz/trees.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/deps/libz/deflate.c b/deps/libz/deflate.c index 9e9a31dd41..c9bfca87a4 100644 --- a/deps/libz/deflate.c +++ b/deps/libz/deflate.c @@ -1511,7 +1511,8 @@ static uInt longest_match(deflate_state *s, IPos cur_match) * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ - scan += 2, match++; + scan += 2; + match++; Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; @@ -1585,7 +1586,8 @@ static uInt longest_match(s, cur_match) * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ - scan += 2, match += 2; + scan += 2; + match += 2; Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; diff --git a/deps/libz/trees.c b/deps/libz/trees.c index 1ab18df2ae..808d13661a 100644 --- a/deps/libz/trees.c +++ b/deps/libz/trees.c @@ -262,7 +262,11 @@ static void gen_bitlen(deflate_state *s, tree_desc *desc) for (h = s->heap_max+1; h < HEAP_SIZE; h++) { n = s->heap[h]; bits = tree[tree[n].Dad].Len + 1; - if (bits > max_length) bits = max_length, overflow++; + if (bits > max_length) + { + bits = max_length; + overflow++; + } tree[n].Len = (ush)bits; /* We overwrite tree[n].Dad which is no longer needed */ @@ -373,7 +377,8 @@ static void build_tree(deflate_state *s, tree_desc *desc) * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. * heap[0] is not used. */ - s->heap_len = 0, s->heap_max = HEAP_SIZE; + s->heap_len = 0; + s->heap_max = HEAP_SIZE; for (n = 0; n < elems; n++) { if (tree[n].Freq != 0) { @@ -856,7 +861,8 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, register unsigned res = 0; do { res |= codes & 1; - codes >>= 1, res <<= 1; + codes >>= 1; + res <<= 1; } while (--len > 0); return res >> 1; }