(libz) Clang does not like this at all - warning: possible misuse of comma operator here [-Wcomma]
This commit is contained in:
parent
5b3942eae7
commit
e9e6607fc9
|
@ -1511,7 +1511,8 @@ static uInt longest_match(deflate_state *s, IPos cur_match)
|
||||||
* are always equal when the other bytes match, given that
|
* are always equal when the other bytes match, given that
|
||||||
* the hash keys are equal and that HASH_BITS >= 8.
|
* the hash keys are equal and that HASH_BITS >= 8.
|
||||||
*/
|
*/
|
||||||
scan += 2, match++;
|
scan += 2;
|
||||||
|
match++;
|
||||||
Assert(*scan == *match, "match[2]?");
|
Assert(*scan == *match, "match[2]?");
|
||||||
|
|
||||||
/* We check for insufficient lookahead only every 8th comparison;
|
/* 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
|
* are always equal when the other bytes match, given that
|
||||||
* the hash keys are equal and that HASH_BITS >= 8.
|
* the hash keys are equal and that HASH_BITS >= 8.
|
||||||
*/
|
*/
|
||||||
scan += 2, match += 2;
|
scan += 2;
|
||||||
|
match += 2;
|
||||||
Assert(*scan == *match, "match[2]?");
|
Assert(*scan == *match, "match[2]?");
|
||||||
|
|
||||||
/* We check for insufficient lookahead only every 8th comparison;
|
/* We check for insufficient lookahead only every 8th comparison;
|
||||||
|
|
|
@ -262,7 +262,11 @@ static void gen_bitlen(deflate_state *s, tree_desc *desc)
|
||||||
for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
|
for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
|
||||||
n = s->heap[h];
|
n = s->heap[h];
|
||||||
bits = tree[tree[n].Dad].Len + 1;
|
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;
|
tree[n].Len = (ush)bits;
|
||||||
/* We overwrite tree[n].Dad which is no longer needed */
|
/* 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[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
|
||||||
* heap[0] is not used.
|
* 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++) {
|
for (n = 0; n < elems; n++) {
|
||||||
if (tree[n].Freq != 0) {
|
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;
|
register unsigned res = 0;
|
||||||
do {
|
do {
|
||||||
res |= codes & 1;
|
res |= codes & 1;
|
||||||
codes >>= 1, res <<= 1;
|
codes >>= 1;
|
||||||
|
res <<= 1;
|
||||||
} while (--len > 0);
|
} while (--len > 0);
|
||||||
return res >> 1;
|
return res >> 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue