From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: problem report #101 Date: Tue, 02 Dec 2008 11:16:02 +0900 Message-ID: References: <200812011659.mB1GxPZD015344@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1228184200 4170 80.91.229.12 (2 Dec 2008 02:16:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2008 02:16:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 02 03:17:43 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7KpL-0001dF-RU for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 03:17:28 +0100 Original-Received: from localhost ([127.0.0.1]:57482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7KoB-0007S0-7x for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 21:16:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7Ko6-0007Rv-6c for emacs-devel@gnu.org; Mon, 01 Dec 2008 21:16:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7Ko4-0007RX-7U for emacs-devel@gnu.org; Mon, 01 Dec 2008 21:16:09 -0500 Original-Received: from [199.232.76.173] (port=38208 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7Ko3-0007RU-Uu for emacs-devel@gnu.org; Mon, 01 Dec 2008 21:16:07 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:63225) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7Ko3-0005Nb-Bk for emacs-devel@gnu.org; Mon, 01 Dec 2008 21:16:07 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id mB22G2xC024795; Tue, 2 Dec 2008 11:16:02 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id mB22G2nj021329; Tue, 2 Dec 2008 11:16:02 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id mB22G2HI009945; Tue, 2 Dec 2008 11:16:02 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1L7Kny-00064v-Ag; Tue, 02 Dec 2008 11:16:02 +0900 In-reply-to: <200812011659.mB1GxPZD015344@mothra.ics.uci.edu> (message from Dan Nicolaescu on Mon, 1 Dec 2008 08:59:25 -0800 (PST)) 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) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106412 Archived-At: In article <200812011659.mB1GxPZD015344@mothra.ics.uci.edu>, Dan Nicolaescu 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 handa@ni.aist.go.jp