diff options
| author | Po Lu | 2022-11-06 19:42:36 +0800 |
|---|---|---|
| committer | Po Lu | 2022-11-06 19:42:36 +0800 |
| commit | dad452552bebf832e737ebb946b5eea6cd57f63f (patch) | |
| tree | ff08a9ac8bdedc3037c2f21d036c60c6da178e09 /src | |
| parent | f305d1ab3a913ce30cfb28fdce48d99d65caf256 (diff) | |
| download | emacs-dad452552bebf832e737ebb946b5eea6cd57f63f.tar.gz emacs-dad452552bebf832e737ebb946b5eea6cd57f63f.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 16 |
1 files changed, 8 insertions, 8 deletions
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) | |||
| 23154 | point temporarily moved to window-point. */ | 23154 | point temporarily moved to window-point. */ |
| 23155 | specbind (Qinhibit_quit, Qt); | 23155 | specbind (Qinhibit_quit, Qt); |
| 23156 | /* The default face, possibly remapped. */ | 23156 | /* The default face, possibly remapped. */ |
| 23157 | struct face *default_face = | 23157 | struct face *default_face |
| 23158 | FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); | 23158 | = FACE_FROM_ID (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); |
| 23159 | const int extend_face_id = | 23159 | const int extend_face_id |
| 23160 | (it->face_id == default_face->id || it->s != NULL) | 23160 | = ((it->face_id == default_face->id || it->s != NULL) |
| 23161 | ? it->face_id | 23161 | ? it->face_id |
| 23162 | : (it->glyph_row->ends_at_zv_p | 23162 | : (it->glyph_row->ends_at_zv_p |
| 23163 | ? default_face->id | 23163 | ? default_face->id |
| 23164 | : face_at_pos (it, LFACE_EXTEND_INDEX)); | 23164 | : face_at_pos (it, LFACE_EXTEND_INDEX))); |
| 23165 | unbind_to (count, Qnil); | 23165 | unbind_to (count, Qnil); |
| 23166 | 23166 | ||
| 23167 | /* Face extension extends the background and box of IT->extend_face_id | 23167 | /* Face extension extends the background and box of IT->extend_face_id |