From: Po Lu Date: Sun, 6 Nov 2022 11:42:36 +0000 (+0800) Subject: Pacify -Wnull-dereference X-Git-Tag: emacs-29.0.90~1616^2~263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dad452552bebf832e737ebb946b5eea6cd57f63f;p=emacs.git Pacify -Wnull-dereference * src/xdisp.c (extend_face_to_end_of_line): Use FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, when the next line proceeds to immediately dereference the face. --- diff --git a/src/xdisp.c b/src/xdisp.c index 054adb9d9d9..ea193601b54 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -23154,14 +23154,14 @@ extend_face_to_end_of_line (struct it *it) point temporarily moved to window-point. */ specbind (Qinhibit_quit, Qt); /* The default face, possibly remapped. */ - struct face *default_face = - FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); - const int extend_face_id = - (it->face_id == default_face->id || it->s != NULL) - ? it->face_id - : (it->glyph_row->ends_at_zv_p - ? default_face->id - : face_at_pos (it, LFACE_EXTEND_INDEX)); + struct face *default_face + = FACE_FROM_ID (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); + const int extend_face_id + = ((it->face_id == default_face->id || it->s != NULL) + ? it->face_id + : (it->glyph_row->ends_at_zv_p + ? default_face->id + : face_at_pos (it, LFACE_EXTEND_INDEX))); unbind_to (count, Qnil); /* Face extension extends the background and box of IT->extend_face_id