From: Paul Eggert Date: Fri, 4 Nov 2022 18:00:49 +0000 (-0700) Subject: Pacify gcc -Wanalyzer-null-dereference X-Git-Tag: emacs-29.0.90~1616^2~306 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90a0aac3e8ebfb9f3c1df04deb9c85414f3530c0;p=emacs.git Pacify gcc -Wanalyzer-null-dereference This is for gcc 12.2.1 20220819 (Red Hat 12.2.1-2) x86-64 when Emacs is configured with --enable-gcc-warnings. * src/buffer.c (Fmove_overlay): Prefer BASE_EQ to EQ in a place where they’re equivalent because the only symbol allowed here is nil. --- diff --git a/src/buffer.c b/src/buffer.c index ee0b7e13508..745e62f53f7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3619,7 +3619,7 @@ buffer. */) o_end = OVERLAY_END (overlay); } - if (! EQ (buffer, obuffer)) + if (! BASE_EQ (buffer, obuffer)) { if (! NILP (obuffer)) remove_buffer_overlay (XBUFFER (obuffer), XOVERLAY (overlay));