Pacify gcc -Woverflow more clearly

* src/alloc.c (mark_maybe_pointer): Make it clearer that ANDing
with UINTPTR_MAX is intended.  Omit a now-unnecessary cast.
This commit is contained in:
Paul Eggert 2021-07-14 17:10:06 -05:00
parent 525d5cab36
commit 0afbde4e68

View file

@ -4764,7 +4764,9 @@ mark_maybe_pointer (void *p, bool symbol_only)
from Emacs source code, it can occur in some cases. To fix
this problem, the pdumper code should grok non-initial
addresses, as the non-pdumper code does. */
void *po = (void *) ((uintptr_t) p & (uintptr_t) VALMASK);
uintptr_t mask = VALMASK & UINTPTR_MAX;
uintptr_t masked_p = (uintptr_t) p & mask;
void *po = (void *) masked_p;
char *cp = p;
char *cpo = po;
/* Don't use pdumper_object_p_precise here! It doesn't check the