]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed conversion warning when assigning wsize to Pos variable.
authorNathan Moinvaziri <nathan@nathanm.com>
Fri, 2 Oct 2020 05:59:27 +0000 (22:59 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 2 Nov 2020 16:01:58 +0000 (17:01 +0100)
  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

deflate.c

index a1553aaf46041d4b1821d97804498616d8e51dfc..0f03656b3755943a135eeff1ad1c6e9b95c6f695 100644 (file)
--- 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);
         }
     }