From 9f89c8fc1afd570b95df2d066c085e4cb581ef8c Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Fri, 3 Jul 2020 20:10:25 -0700 Subject: [PATCH] Fixed signed integer comparison warning in deflatePrime bits check. deflate.c:589:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] --- deflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.47.2