changeset 4809:0d3ccd5a2509

Initialize the result variable passed to FcFontMatch. See xemacs-patches message <870180fe1001071349i63d185bfu4906c5a4399407cd@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Thu, 07 Jan 2010 14:50:24 -0700
parents 53071486ff7a
children 3c96cf473e07
files src/ChangeLog src/font-mgr.c src/objects-xlike-inc.c
diffstat 3 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 07 12:44:25 2010 -0700
+++ b/src/ChangeLog	Thu Jan 07 14:50:24 2010 -0700
@@ -1,3 +1,9 @@
+2010-01-07  Jerry James  <james@xemacs.org>
+
+	* font-mgr.c (Ffc_font_match): Initialize result to FcResultMatch
+	before calling FcFontMatch.
+	* objects-xlike-inc.c (xft_find_charset_font): Ditto.
+
 2010-01-07  Henrique Martins  <xemacs@martins.cc>
 
 	* dired.c (file_name_completion): If a file is too big to stat(),
--- a/src/font-mgr.c	Thu Jan 07 12:44:25 2010 -0700
+++ b/src/font-mgr.c	Thu Jan 07 14:50:24 2010 -0700
@@ -1004,6 +1004,7 @@
 
   FcConfigSubstitute (fcc, p, FcMatchPattern);
   FcDefaultSubstitute (p);
+  res = FcResultMatch;
   res_fcpat->fcpatPtr = FcFontMatch (fcc, p, &res);
 
   if (res_fcpat->fcpatPtr == NULL)
--- a/src/objects-xlike-inc.c	Thu Jan 07 12:44:25 2010 -0700
+++ b/src/objects-xlike-inc.c	Thu Jan 07 14:50:24 2010 -0700
@@ -445,6 +445,7 @@
 	FcDefaultSubstitute (p);
 	PRINT_XFT_PATTERN (3, "FcDefaultSubstitute'ed name is %s\n", p);
 	/* #### check fcresult of following match? */
+	fcresult = FcResultMatch;
 	fontxft = FcFontMatch (fcc, p, &fcresult);
 	switch (fcresult)
 	  {