unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem report #116: base/src/emacs/src/fontset.c (face_for_char); UNINIT
@ 2008-12-03  0:54 Dan Nicolaescu
  2008-12-03  5:31 ` Kenichi Handa
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-03  0:54 UTC (permalink / raw)
  To: emacs-devel

CID: 116
Checker: UNINIT (help)
File: base/src/emacs/src/fontset.c
Function: face_for_char
Description: Using uninitialized value "id" in call to function "fontset_font"

867  	
868  	int
869  	face_for_char (f, face, c, pos, object)
870  	     FRAME_PTR f;
871  	     struct face *face;
872  	     int c, pos;
873  	     Lisp_Object object;
874  	{
875  	  Lisp_Object fontset, rfont_def, charset;
876  	  int face_id;

Event var_decl: Declared variable "id" without initializer
Also see events: [uninit_use_in_call]

877  	  int id;
878  	

At conditional (1): "c < 128" taking false path

879  	  if (ASCII_CHAR_P (c))
880  	    return face->ascii_face->id;
881  	
882  	  xassert (fontset_id_valid_p (face->fontset));
883  	  fontset = FONTSET_FROM_ID (face->fontset);
884  	  xassert (!BASE_FONTSET_P (fontset));
885  	

At conditional (2): "pos < 0" taking false path

886  	  if (pos < 0)
887  	    {
888  	      id = -1;
889  	      charset = Qnil;
890  	    }
891  	  else
892  	    {
893  	      charset = Fget_char_property (make_number (pos), Qcharset, object);

At conditional (3): "charset == Qnil" taking false path

894  	      if (NILP (charset))
895  		id = -1;

At conditional (4): "hash_lookup >= 0" taking false path

896  	      else if (CHARSETP (charset))
897  		{
898  		  Lisp_Object val;
899  	
900  		  val = assoc_no_quit (charset, Vfont_encoding_charset_alist);
901  		  if (CONSP (val) && CHARSETP (XCDR (val)))
902  		    charset = XCDR (val);
903  		  id = XINT (CHARSET_SYMBOL_ID (charset));
904  		}
905  	    }
906  	
907  	  font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);

Event uninit_use_in_call: Using uninitialized value "id" in call to function "fontset_font" [model]
Also see events: [var_decl]

908  	  rfont_def = fontset_font (fontset, c, face, id);
909  	  if (VECTORP (rfont_def))
910  	    {




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem report #116: base/src/emacs/src/fontset.c (face_for_char); UNINIT
  2008-12-03  0:54 Problem report #116: base/src/emacs/src/fontset.c (face_for_char); UNINIT Dan Nicolaescu
@ 2008-12-03  5:31 ` Kenichi Handa
  0 siblings, 0 replies; 2+ messages in thread
From: Kenichi Handa @ 2008-12-03  5:31 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

In article <200812030115.mB31Fqub022795@mothra.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:

> CID: 116
> Checker: UNINIT (help)
> File: base/src/emacs/src/fontset.c
> Function: face_for_char
> Description: Using uninitialized value "id" in call to function "fontset_font"

Fixed.

---
Kenichi Handa
handa@ni.aist.go.jp




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-03  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03  0:54 Problem report #116: base/src/emacs/src/fontset.c (face_for_char); UNINIT Dan Nicolaescu
2008-12-03  5:31 ` Kenichi Handa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).