File 0003-Fix-external-declarations-of-crc32c.patch of Package mhvtl

From be40f77c7d1b7236ae49be61763b6f9016be9ed7 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Wed, 4 Jun 2025 08:00:05 -0700
Subject: [PATCH 3/4] Fix external declarations of crc32c()

The function uses the last (3rd) argument of
for size ("sz"), and it should be declared as
size_t, not int, as is done elsewhere.

This fixes a warning about mismatched declarations.

Signed-off-by: Lee Duncan <lduncan@suse.com>
---
 usr/ssc.c          | 2 +-
 usr/validate_crc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/ssc.c b/usr/ssc.c
index 6bc17281d2ff..c67a5e16919e 100644
--- a/usr/ssc.c
+++ b/usr/ssc.c
@@ -2332,7 +2332,7 @@ uint8_t ssc_recv_diagnostics(struct scsi_cmd *cmd)
 }
 
 uint32_t GenerateRSCRC(uint32_t seed, int sz, const uint8_t *buf);
-uint32_t crc32c(uint32_t seed, const uint8_t *buf, int sz);
+uint32_t crc32c(uint32_t seed, const uint8_t *buf, size_t sz);
 
 uint8_t ssc_send_diagnostics(struct scsi_cmd *cmd)
 {
diff --git a/usr/validate_crc.c b/usr/validate_crc.c
index 1405b8a5d4c0..d26f685c1e5b 100644
--- a/usr/validate_crc.c
+++ b/usr/validate_crc.c
@@ -13,7 +13,7 @@
 #include <assert.h>
 #include <inttypes.h>
 
-uint32_t crc32c(uint32_t seed, const uint8_t *buf, int sz);
+uint32_t crc32c(uint32_t seed, const uint8_t *buf, size_t sz);
 uint32_t GenerateRSCRC(uint32_t seed, int sz, const uint8_t *buf);
 
 int main(int argc, char *argv[])
-- 
2.43.0

openSUSE Build Service is sponsored by