]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed possible loss of data warning in h2b in infcover on Windows.
authorNathan Moinvaziri <nathan@nathanm.com>
Sat, 4 Jul 2020 03:38:36 +0000 (20:38 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 14 Aug 2020 20:20:50 +0000 (22:20 +0200)
    infcover.c(247,35): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data

test/infcover.c

index 41f71508299f96f35ea125b5dec918416a05846a..6c96bb565087fab1cd1dfe3c904237e607eddbf1 100644 (file)
@@ -242,7 +242,7 @@ static void mem_done(PREFIX3(stream) *strm, char *prefix) {
 static unsigned char *h2b(const char *hex, unsigned *len) {
     unsigned char *in, *re;
     unsigned next, val;
-    unsigned inlen;
+    size_t inlen;
 
     inlen = (strlen(hex) + 1) >> 1;
     assert(inlen != 0);     /* tell static analyzer we won't call malloc(0) */