From: Nathan Moinvaziri Date: Fri, 2 Oct 2020 05:59:27 +0000 (-0700) Subject: Fixed conversion warning when assigning wsize to Pos variable. X-Git-Tag: v2.0.0-RC1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aa9b7a7a111c870dbf069aef954d7c061f75b68;p=thirdparty%2Fzlib-ng.git Fixed conversion warning when assigning wsize to Pos variable. deflate.c(218,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data deflate.c(241,1): warning C4244: 'initializing': conversion from 'unsigned int' to 'Pos', possible loss of data --- diff --git a/deflate.c b/deflate.c index a1553aaf..0f03656b 100644 --- a/deflate.c +++ b/deflate.c @@ -215,7 +215,7 @@ Z_INTERNAL void slide_hash_c(deflate_state *s) { Pos *q = p - n; for (i = 0; i < n; i++) { Pos m = *q; - Pos t = wsize; + Pos t = (Pos)wsize; *q++ = (Pos)(m >= t ? m-t: 0); } } @@ -238,7 +238,7 @@ Z_INTERNAL void slide_hash_c(deflate_state *s) { Pos *q = p - n; for (i = 0; i < n; i++) { Pos m = *q; - Pos t = wsize; + Pos t = (Pos)wsize; *q++ = (Pos)(m >= t ? m-t: 0); } }