From 4830ef2f65ad32ba457708d398106a65e4a35141 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 31 Aug 2020 00:15:22 -0700 Subject: [PATCH] * 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 6b5bfcbd93a..b12922b5858 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) -- 2.39.2