From 2bf6a4f0071f574197bb97ac72d561c915ab4326 Mon Sep 17 00:00:00 2001 From: martinfouilleul Date: Fri, 12 May 2023 11:13:55 +0200 Subject: [PATCH] Fixed void pointer arithmetic in hash.c to avoid pedantic error on msvc --- src/util/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/hash.c b/src/util/hash.c index afae8e3..e1a4ee0 100644 --- a/src/util/hash.c +++ b/src/util/hash.c @@ -159,7 +159,7 @@ uint64_t xxh_64 (const void *key, int len, uint64_t h) { s64 += len; // up to 31 bytes remain, process 0-3 8 byte blocks - uint8_t *tail = (uint8_t *) (key + (len/32)*32); + uint8_t *tail = (uint8_t *) (((char*)key) + (len/32)*32); for (int i=0;i < (len & 31) / 8; i++,tail+=8) { uint64_t b = (*((uint64_t*) tail))*p2; b = (((b << 31)| (b >> 33))*p1) ^ s64;