all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem report #134: base/src/emacs/src/fontset.c (font_for_char); UNINIT
@ 2008-12-03  1:23 Dan Nicolaescu
  2008-12-03  5:31 ` Kenichi Handa
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-03  1:23 UTC (permalink / raw)
  To: emacs-devel


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

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

945  	  int id;
946  	

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

947  	  if (ASCII_CHAR_P (c))
948  	    {
949  	      Lisp_Object font_object;
950  	
951  	      XSETFONT (font_object, face->ascii_face->font);
952  	      return font_object;
953  	    }
954  	
955  	  xassert (fontset_id_valid_p (face->fontset));
956  	  fontset = FONTSET_FROM_ID (face->fontset);
957  	  xassert (!BASE_FONTSET_P (fontset));

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

958  	  if (pos < 0)
959  	    {
960  	      id = -1;
961  	      charset = Qnil;
962  	    }
963  	  else
964  	    {
965  	      charset = Fget_char_property (make_number (pos), Qcharset, object);

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

966  	      if (NILP (charset))
967  		id = -1;

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

968  	      else if (CHARSETP (charset))
969  		{
970  		  Lisp_Object val;
971  	
972  		  val = assoc_no_quit (charset, Vfont_encoding_charset_alist);
973  		  if (CONSP (val) && CHARSETP (XCDR (val)))
974  		    charset = XCDR (val);
975  		  id = XINT (CHARSET_SYMBOL_ID (charset));
976  		}
977  	    }
978  	
979  	  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]

980  	  rfont_def = fontset_font (fontset, c, face, id);
981  	  return (VECTORP (rfont_def)
982  		  ? RFONT_DEF_OBJECT (rfont_def)
983  		  : Qnil);
984  	}
985  	
9




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

* Re: Problem report #134: base/src/emacs/src/fontset.c (font_for_char); UNINIT
  2008-12-03  1:23 Problem report #134: base/src/emacs/src/fontset.c (font_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 <200812030126.mB31QZIt022828@mothra.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:

> CID: 134
> Checker: UNINIT (help)
> File: base/src/emacs/src/fontset.c
> Function: font_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  1:23 Problem report #134: base/src/emacs/src/fontset.c (font_for_char); UNINIT Dan Nicolaescu
2008-12-03  5:31 ` Kenichi Handa

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.