[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4830ef2: * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogica
From: |
Paul Eggert |
Subject: |
master 4830ef2: * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op. |
Date: |
Mon, 31 Aug 2020 03:15:59 -0400 (EDT) |
branch: master
commit 4830ef2f65ad32ba457708d398106a65e4a35141
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
* src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.
---
src/alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 6b5bfcb..b12922b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4539,9 +4539,9 @@ live_symbol_holding (struct mem_node *m, void *p)
ptrdiff_t off = offset % sizeof b->symbols[0];
if (off == Lisp_Symbol
- /* Use u's offset since '|| off == 0' would run afoul of gcc
+ /* Plain '|| off == 0' would run afoul of GCC 10.2
-Wlogical-op, as Lisp_Symbol happens to be zero. */
- || off == offsetof (struct Lisp_Symbol, u)
+ || (Lisp_Symbol != 0 && off == 0)
|| off == offsetof (struct Lisp_Symbol, u.s.name)
|| off == offsetof (struct Lisp_Symbol, u.s.val)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4830ef2: * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.,
Paul Eggert <=