]> 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>
Tue, 17 Sep 2024 12:05:18 +0000 (14:05 +0200)
Warning C4244
'=': conversion from 'z_word_t' to 'uint32_t', possible loss of data
zlib
crc32_braid_c.c 195

crc32_braid.c

index 96754b53dff95583c3fbd48b7a4486a99a2ce2b4..6993355459f3430b46af0918c8d641d2f3941a14 100644 (file)
@@ -244,7 +244,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;