diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-29 23:14:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-29 23:14:31 -0400 |
| commit | 9ebb039a81f5ea06e97d84ef7ee447da9dfca204 (patch) | |
| tree | dc229247feb19ddec117e3c680dd1c13a40dbdd1 /stdlib/siphash.c | |
| parent | 3e019df9f429caef4b05947cc70652634ebb2467 (diff) | |
Fix up some GCC compiler flag options for LTO and inlining
Diffstat (limited to 'stdlib/siphash.c')
| -rw-r--r-- | stdlib/siphash.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |
