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

CID: 129
Checker: UNINIT (help)
File: base/src/emacs/src/ftfont.c
Function: ftfont_match
Description: Using uninitialized value "entity" in call to function
"font_add_log"

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

923  	  Lisp_Object entity;
924  	  FcPattern *pattern, *match = NULL;
925  	  FcResult result;
926  	  char otlayout[15];		/* For "otlayout:XXXX" */
927  	  struct OpenTypeSpec *otspec = NULL;
928  	

At conditional (1): "fc_initialized == 0" taking true path

929  	  if (! fc_initialized)
930  	    {
931  	      FcInit ();
932  	      fc_initialized = 1;
933  	    }
934  	
935  	  pattern = ftfont_spec_pattern (spec, otlayout, &otspec);

At conditional (2): "pattern == 0" taking false path

936  	  if (! pattern)
937  	    return Qnil;
938  	

At conditional (3): "((0), (spec & -8))->contents[8] & 7 == 0" taking true path

939  	  if (INTEGERP (AREF (spec, FONT_SIZE_INDEX)))
940  	    {
941  	      FcValue value;
942  	
943  	      value.type = FcTypeDouble;
944  	      value.u.d = XINT (AREF (spec, FONT_SIZE_INDEX));
945  	      FcPatternAdd (pattern, FC_PIXEL_SIZE, value, FcFalse);
946  	    }

At conditional (4): "FcConfigSubstitute == 1" taking true path

947  	  if (FcConfigSubstitute (NULL, pattern, FcMatchPattern) == FcTrue)
948  	    {
949  	      FcDefaultSubstitute (pattern);
950  	      match = FcFontMatch (NULL, pattern, &result);

At conditional (5): "match != 0" taking false path

951  	      if (match)
952  		{
953  		  entity = ftfont_pattern_entity (match, AREF (spec, FONT_EXTRA_INDEX));
954  		  FcPatternDestroy (match);
955  		  if (! NILP (AREF (spec, FONT_FAMILY_INDEX))
956  		      && NILP (assq_no_quit (AREF (spec, FONT_FAMILY_INDEX),
957  					     ftfont_generic_family_list))
958  		      && NILP (Fstring_equal (AREF (spec, FONT_FAMILY_INDEX),
959  					      AREF (entity, FONT_FAMILY_INDEX))))
960  		    entity = Qnil;
961  		}
962  	    }
963  	  FcPatternDestroy (pattern);
964  	

Event uninit_use_in_call: Using uninitialized value "entity" in call to function "font_add_log" [model]
Also see events: [var_decl][uninit_use]

965  	  font_add_log ("ftfont-match", spec, entity);

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

966  	  return entity;
967  	}
968  	
969  	static Lisp_Object
970  	ftfont_list_family (frame)
971




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

* Re: Problem report #129: base/src/emacs/src/ftfont.c (ftfont_match); UNINIT
  2008-12-03  1:12 Problem report #129: base/src/emacs/src/ftfont.c (ftfont_match); UNINIT Dan Nicolaescu
@ 2008-12-03  4:53 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2008-12-03  4:53 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> CID: 129
> Checker: UNINIT (help)
> File: base/src/emacs/src/ftfont.c
> Function: ftfont_match
> Description: Using uninitialized value "entity" in call to function
> "font_add_log"

Fixed, thanks.




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

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