* src/fns.c (hash_string): Suppress warning on 32-bit platforms

Remove a shift-too-wide complaint by GCC in code that is never reached
on platforms where that shift is too wide.
This commit is contained in:
Mattias Engdegård 2024-02-22 20:15:33 +01:00
parent f85280503a
commit 53e60fb004

View file

@ -5086,6 +5086,8 @@ hash_string (char const *ptr, ptrdiff_t len)
/* String is shorter than an EMACS_UINT. Use smaller loads. */
eassume (p <= end && end - p < sizeof (EMACS_UINT));
EMACS_UINT tail = 0;
verify (sizeof tail <= 8);
#if EMACS_INT_MAX > INT32_MAX
if (end - p >= 4)
{
uint32_t c;
@ -5093,6 +5095,7 @@ hash_string (char const *ptr, ptrdiff_t len)
tail = (tail << (8 * sizeof c)) + c;
p += sizeof c;
}
#endif
if (end - p >= 2)
{
uint16_t c;