add cast from size_t to unsigned to avoid warnings from certain compilers

Tue, 29 Oct 2024 16:08:37 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 29 Oct 2024 16:08:37 +0100
changeset 949
c2ba65ea8d31
parent 948
036b431e70ee
child 950
37e7f92de46b

add cast from size_t to unsigned to avoid warnings from certain compilers

src/hash_key.c file | annotate | diff | comparison | revisions
--- a/src/hash_key.c	Tue Oct 29 16:01:10 2024 +0100
+++ b/src/hash_key.c	Tue Oct 29 16:08:37 2024 +0100
@@ -40,7 +40,7 @@
 
     unsigned m = 0x5bd1e995;
     unsigned r = 24;
-    unsigned h = 25 ^ len;
+    unsigned h = 25 ^ (unsigned) len;
     unsigned i = 0;
     while (len >= 4) {
         unsigned k = data[i + 0] & 0xFF;

mercurial