emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master da2f772 1/5: Pacify gcc -Woverflow more nicely


From: Paul Eggert
Subject: master da2f772 1/5: Pacify gcc -Woverflow more nicely
Date: Mon, 12 Jul 2021 03:12:29 -0400 (EDT)

branch: master
commit da2f772fe575b20bff51b49aa5ded2bf15a2c89d
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Pacify gcc -Woverflow more nicely
    
    * src/alloc.c (mark_maybe_pointer): Simplify pacification
    of gcc -Woverflow (unknown GCC version).
---
 src/alloc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index e3b038c..ee3fd64 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4764,12 +4764,7 @@ 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.  */
-#ifdef WIDE_EMACS_INT
-      uintptr_t mask = ~((uintptr_t) 0);
-#else
-      uintptr_t mask = VALMASK;
-#endif
-      void *po = (void *) ((uintptr_t) p & mask);
+      void *po = (void *) ((uintptr_t) p & (uintptr_t) VALMASK);
       char *cp = p;
       char *cpo = po;
       /* Don't use pdumper_object_p_precise here! It doesn't check the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]