aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2021-07-14 17:10:06 -0500
committerPaul Eggert2021-07-14 17:20:19 -0500
commit0afbde4e68c1161a54f9593ecb5b66fe42aa0de4 (patch)
tree895863d8ecb6981e184770546a4e051fe3f2cea9 /src/alloc.c
parent525d5cab36fe7e719ecc49b88a1ac68abbe7924c (diff)
downloademacs-0afbde4e68c1161a54f9593ecb5b66fe42aa0de4.tar.gz
emacs-0afbde4e68c1161a54f9593ecb5b66fe42aa0de4.zip
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.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index ee3fd64a003..8edcd06c843 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4764,7 +4764,9 @@ mark_maybe_pointer (void *p, bool symbol_only)
4764 from Emacs source code, it can occur in some cases. To fix 4764 from Emacs source code, it can occur in some cases. To fix
4765 this problem, the pdumper code should grok non-initial 4765 this problem, the pdumper code should grok non-initial
4766 addresses, as the non-pdumper code does. */ 4766 addresses, as the non-pdumper code does. */
4767 void *po = (void *) ((uintptr_t) p & (uintptr_t) VALMASK); 4767 uintptr_t mask = VALMASK & UINTPTR_MAX;
4768 uintptr_t masked_p = (uintptr_t) p & mask;
4769 void *po = (void *) masked_p;
4768 char *cp = p; 4770 char *cp = p;
4769 char *cpo = po; 4771 char *cpo = po;
4770 /* Don't use pdumper_object_p_precise here! It doesn't check the 4772 /* Don't use pdumper_object_p_precise here! It doesn't check the