unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem report #128: base/src/emacs/src/ftfont.c (ftfont_resolve_generic_family); UNINIT
@ 2008-12-03  1:05 Dan Nicolaescu
  2008-12-03  4:56 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-03  1:05 UTC (permalink / raw)
  To: emacs-devel

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




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

end of thread, other threads:[~2008-12-03  4:56 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:05 Problem report #128: base/src/emacs/src/ftfont.c (ftfont_resolve_generic_family); UNINIT Dan Nicolaescu
2008-12-03  4:56 ` Chong Yidong

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).