--- a/ucx/hash_key.c Thu Nov 28 17:53:13 2024 +0100 +++ b/ucx/hash_key.c Mon Jan 06 21:18:36 2025 +0100 @@ -30,7 +30,7 @@ #include <string.h> void cx_hash_murmur(CxHashKey *key) { - unsigned char const *data = key->data; + const unsigned char *data = key->data; if (data == NULL) { // extension: special value for NULL key->hash = 1574210520u; @@ -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; @@ -81,7 +81,7 @@ key->hash = h; } -CxHashKey cx_hash_key_str(char const *str) { +CxHashKey cx_hash_key_str(const char *str) { CxHashKey key; key.data = str; key.len = str == NULL ? 0 : strlen(str); @@ -90,7 +90,7 @@ } CxHashKey cx_hash_key_bytes( - unsigned char const *bytes, + const unsigned char *bytes, size_t len ) { CxHashKey key; @@ -101,7 +101,7 @@ } CxHashKey cx_hash_key( - void const *obj, + const void *obj, size_t len ) { CxHashKey key;