master 492dd426331: Pacify gcc -Wanalyzer-null-dereference in load_comp_init

Paul Eggert <[email protected]> Thu, 23 Jul 2026 14:36:09 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit 492dd426331aab3e8571fa56967ae149900693a4
Author: Paul Eggert <[email protected]>
Commit: Paul Eggert <[email protected]>

    Pacify gcc -Wanalyzer-null-dereference in load_comp_init
    
    This pacifies gcc 16.1.1 20260515 (Red Hat 16.1.1-2)
    when Emacs is configured with --enable-gcc-warnings.
    * src/comp.c (load_comp_unit): Change eassert to eassume.
---
 src/comp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/comp.c b/src/comp.c
index 80910cb3896..3f2d1ad6281 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5244,7 +5244,7 @@ load_comp_unit (struct Lisp_Native_Comp_Unit *comp_u, bool loading_dump,
   comp_u->loaded_once = !NILP (*saved_cu);
   Lisp_Object *data_eph_relocs
     = find_relocs (handle, DATA_RELOC_EPHEMERAL_ADDR_SYM);
-  eassert (data_eph_relocs);
+  eassume (data_eph_relocs);
 
   /* While resurrecting from an image dump loading more than once the
      same compilation unit does not make any sense.  */