]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed casting warning from bi_reverse in maketrees.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Tue, 12 May 2020 13:27:03 +0000 (09:27 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 30 May 2020 19:25:18 +0000 (21:25 +0200)
maketrees.c(93,58): warning C4244: '=': conversion from 'unsigned int' to 'uint16_
t', possible loss of data

tools/maketrees.c

index cb6e146f6eb1f86373f7f5caa73b3907148b7e6b..150e02668412b61ef3cafff56a8d2875fc40b1eb 100644 (file)
@@ -90,7 +90,7 @@ static void tr_static_init(void) {
     /* The static distance tree is trivial: */
     for (n = 0; n < D_CODES; n++) {
         static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
+        static_dtree[n].Code = (uint16_t)bi_reverse((unsigned)n, 5);
     }
 }