From 9ebb039a81f5ea06e97d84ef7ee447da9dfca204 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 29 Oct 2024 23:14:31 -0400 Subject: Fix up some GCC compiler flag options for LTO and inlining --- stdlib/siphash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib/siphash.c') diff --git a/stdlib/siphash.c b/stdlib/siphash.c index a8e64c8e..44e8b6eb 100644 --- a/stdlib/siphash.c +++ b/stdlib/siphash.c @@ -49,11 +49,13 @@ public uint64_t TOMO_HASH_KEY[2] = {23, 42}; // Randomized in tomo_init() PUREFUNC public uint64_t siphash24(const uint8_t *src, size_t src_sz) { siphash sh; if ((uint64_t)src % __alignof__(uint64_t) == 0) { +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" const uint64_t *in = (uint64_t*)src; /* Find largest src_sz evenly divisible by 8 bytes. */ const ptrdiff_t src_sz_nearest_8bits = ((ptrdiff_t)src_sz >> 3) << 3; const uint64_t *goal = (uint64_t*)(src + src_sz_nearest_8bits); +#pragma GCC diagnostic pop siphashinit(&sh, src_sz); src_sz -= (size_t)src_sz_nearest_8bits; while (in < goal) { -- cgit v1.2.3