From 917acbd4e1da5479192ec2e38993e030723cbe59 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Tue, 28 Jul 2026 18:09:54 -0500 Subject: [PATCH] Avoid crc32 narrowing warning The CRC is already masked to 32 bits, but Clang still diagnoses the implicit conversion from uLong to z_crc_t under -Wshorten-64-to-32. Make the intended narrowing explicit. Files changed: - crc32.c Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6b269873-a7bf-490e-a412-70a920868135 --- crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crc32.c b/crc32.c index d9ade51502..32b1d04578 100644 --- a/crc32.c +++ b/crc32.c @@ -686,7 +686,7 @@ uLong ZEXPORT crc32_z(uLong crc, const unsigned char FAR *buf, z_size_t len) { #endif /* Initialize the CRC for each braid. */ - crc0 = crc; + crc0 = (z_crc_t)crc; #if N > 1 crc1 = 0; #if N > 2