1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-05 01:53:01 +00:00

Fix build warnings on Linux GCC version 12.1.0 x64

This commit is contained in:
Calvin Rose
2022-07-20 08:04:03 -05:00
parent 3c2af95d21
commit 1900d8f843
2 changed files with 3 additions and 3 deletions

View File

@@ -348,7 +348,7 @@ int32_t janet_hash(Janet x) {
hash = (int32_t)((hilo << 16) | (hilo >> 16));
} else {
/* Assuming 4 byte pointer (or smaller) */
uintptr_t diff = janet_unwrap_pointer(x);
uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
uint32_t hilo = (uint32_t) diff * 2654435769u;
hash = (int32_t)((hilo << 16) | (hilo >> 16));
}