From: Mattias EngdegÄrd Date: Thu, 22 Feb 2024 19:15:33 +0000 (+0100) Subject: * src/fns.c (hash_string): Suppress warning on 32-bit platforms X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5afc11aa5845b213f8f979ea38de7d656aa94b3;p=emacs.git * 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. (cherry picked from commit 53e60fb004c0e8b40b01fcfcf7f406557e35aa3e) --- diff --git a/src/fns.c b/src/fns.c index 0a9692f36e8..737757d06cc 100644 --- a/src/fns.c +++ b/src/fns.c @@ -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;