From: Nathan Moinvaziri Date: Sat, 4 Jul 2020 03:10:25 +0000 (-0700) Subject: Fixed signed integer comparison warning in deflatePrime bits check. X-Git-Tag: 1.9.9-b1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f89c8fc1afd570b95df2d066c085e4cb581ef8c;p=thirdparty%2Fzlib-ng.git Fixed signed integer comparison warning in deflatePrime bits check. deflate.c:589:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] --- diff --git a/deflate.c b/deflate.c index 8af1af32..815c5219 100644 --- a/deflate.c +++ b/deflate.c @@ -587,7 +587,7 @@ int32_t ZEXPORT PREFIX(deflatePrime)(PREFIX3(stream) *strm, int32_t bits, int32_ if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; - if (bits < 0 || bits > BIT_BUF_SIZE || bits > (sizeof(value) << 3) || + if (bits < 0 || bits > BIT_BUF_SIZE || bits > (int32_t)(sizeof(value) << 3) || s->sym_buf < s->pending_out + ((BIT_BUF_SIZE + 7) >> 3)) return Z_BUF_ERROR; do {