all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Problem report #128: base/src/emacs/src/ftfont.c (ftfont_resolve_generic_family); UNINIT
Date: Tue, 02 Dec 2008 17:05:53 -0800	[thread overview]
Message-ID: <200812030120.mB31KN2I022809@mothra.ics.uci.edu> (raw)

CID: 128
Checker: UNINIT (help)
File: base/src/emacs/src/ftfont.c
Function: ftfont_resolve_generic_family
Description: Using uninitialized value "match"


Event var_decl: Declared variable "match" without initializer
Also see events: [uninit_use]

209  	  FcPattern *match;
210  	  FcResult result;
211  	  FcLangSet *langset;
212  	
213  	  family = Fintern (Fdowncase (SYMBOL_NAME (family)), Qnil);

At conditional (1): "family == Qmono" taking true path

214  	  if (EQ (family, Qmono))
215  	    family = Qmonospace;
216  	  else if (EQ (family, Qsans) || EQ (family, Qsans__serif))
217  	    family = Qsans_serif;
218  	  slot = assq_no_quit (family, ftfont_generic_family_list);

At conditional (2): "slot & 7 != 5" taking false path

219  	  if (! CONSP (slot))
220  	    return Qnil;

At conditional (3): "(0 + (((0), (slot & -8))->u).cdr) != Qt" taking false path

221  	  if (! EQ (XCDR (slot), Qt))
222  	    return XCDR (slot);
223  	  pattern = FcPatternDuplicate (pattern);

At conditional (4): "pattern == 0" taking true path

224  	  if (! pattern)
225  	    goto err;
226  	  FcPatternDel (pattern, FC_FOUNDRY);
227  	  FcPatternDel (pattern, FC_FAMILY);
228  	  FcPatternAddString (pattern, FC_FAMILY, SYMBOL_FcChar8 (family));
229  	  if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) != FcResultMatch)
230  	    {
231  	      /* This is to avoid the effect of locale.  */
232  	      langset = FcLangSetCreate ();
233  	      FcLangSetAdd (langset, "en");
234  	      FcPatternAddLangSet (pattern, FC_LANG, langset);
235  	      FcLangSetDestroy (langset);
236  	    }
237  	  FcConfigSubstitute (NULL, pattern, FcMatchPattern);
238  	  FcDefaultSubstitute (pattern);
239  	  match = FcFontMatch (NULL, pattern, &result);
240  	  if (match)
241  	    {
242  	      FcChar8 *fam;
243  	
244  	      if (FcPatternGetString (match, FC_FAMILY, 0, &fam) == FcResultMatch)
245  		family = intern ((char *) fam);
246  	    }
247  	  else
248  	    family = Qnil;
249  	  XSETCDR (slot, family);
250  	 err:

Event uninit_use: Using uninitialized value "match"
Also see events: [var_decl]

251  	  if (match) FcPatternDestroy (match);
252  	  if (pattern) FcPatternDestroy (pattern);
253  	  return family;
254  	}
2




             reply	other threads:[~2008-12-03  1:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03  1:05 Dan Nicolaescu [this message]
2008-12-03  4:56 ` Problem report #128: base/src/emacs/src/ftfont.c (ftfont_resolve_generic_family); UNINIT Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812030120.mB31KN2I022809@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.