emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem report #134: base/src/emacs/src/fontset.c (font_for_char); UNINI


From: Dan Nicolaescu
Subject: Problem report #134: base/src/emacs/src/fontset.c (font_for_char); UNINIT
Date: Tue, 02 Dec 2008 17:23:36 -0800

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]