[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem report #101
From: |
Kenichi Handa |
Subject: |
Re: problem report #101 |
Date: |
Tue, 02 Dec 2008 11:16:02 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Dan Nicolaescu <address@hidden> writes:
> CID: 101
> Checker: FORWARD_NULL (help)
> File: base/src/emacs/src/font.c
> Function: font_at
> Description: Variable "face" tracked as NULL was passed to a function that
> dereferences it.
[...]
> Event var_deref_op: Variable "face" tracked as NULL was dereferenced.
> Event var_deref_model: Variable "face" tracked as NULL was passed to a
> function that dereferences it. [model]
> Also see events: [var_compare_op][var_deref_model]
> At conditional (5): "c < 128" taking true path
> 3646 int face_id = FACE_FOR_CHAR (f, face, c, pos, string);
> 3647 face = FACE_FROM_ID (f, face_id);
> 3648 }
Here, "face" is a return value of
face_at_string/buffer_position, and thus is never NULL.
Which do you think is better; ignore this waring or use a
new macro FACE_FROM_ID_NO_CHECK instead of FACE_FROM_ID?
/* Like FACE_FROM_ID but don't check the validity of ID. */
#define FACE_FROM_ID_NO_CHECK(F, ID) \
(FRAME_FACE_CACHE (F)->faces_by_id[ID])
---
Kenichi Handa
address@hidden