]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Silence possible loss of data warning in crc32_braid ZSWAPWORD call
authorNathan Moinvaziri <nathan@nathanm.com>
Mon, 5 Aug 2024 15:59:31 +0000 (08:59 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 9 Aug 2024 11:34:28 +0000 (13:34 +0200)
Warning C4244
'=': conversion from 'z_word_t' to 'uint32_t', possible loss of data
zlib
crc32_braid_c.c 195

arch/generic/crc32_braid_c.c

index 7d8028f6d705559ee9a29436cd6b1dcde0605a08..e94d91a7a9fef62152d6305c62037ba19e2cbadf 100644 (file)
@@ -192,7 +192,7 @@ Z_INTERNAL uint32_t PREFIX(crc32_braid)(uint32_t crc, const uint8_t *buf, size_t
 #endif
 #endif
         words += N;
-        c = ZSWAPWORD(comb);
+        c = (uint32_t)ZSWAPWORD(comb);
 
         /* Update the pointer to the remaining bytes to process. */
         buf = (const unsigned char *)words;