From: Andreas Schwab Date: Tue, 2 Dec 2008 22:47:20 +0000 (+0000) Subject: (font_unparse_fcname): Fix use of uninitialized variable. X-Git-Tag: emacs-pretest-23.0.90~1359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7741ce9a0bc60a6c7d538e405122602f282b79d;p=emacs.git (font_unparse_fcname): Fix use of uninitialized variable. --- diff --git a/src/ChangeLog b/src/ChangeLog index c7e9a9cc457..8a4f81dd845 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-12-02 Andreas Schwab + * font.c (font_unparse_fcname): Fix use of uninitialized variable. + * doprnt.c (doprnt1): Fix size of charbuf. 2008-12-02 Chong Yidong diff --git a/src/font.c b/src/font.c index ccac5af3fd8..ce7091313f6 100644 --- a/src/font.c +++ b/src/font.c @@ -1598,7 +1598,6 @@ font_unparse_fcname (font, pixel_size, name, nbytes) Lisp_Object family, foundry; Lisp_Object tail, val; int point_size; - int dpi; int i, len = 1; char *p; Lisp_Object styles[3]; @@ -1653,7 +1652,7 @@ font_unparse_fcname (font, pixel_size, name, nbytes) } if (INTEGERP (AREF (font, FONT_DPI_INDEX))) - len += sprintf (work, ":dpi=%d", dpi); + len += sprintf (work, ":dpi=%d", XINT (AREF (font, FONT_DPI_INDEX))); if (INTEGERP (AREF (font, FONT_SPACING_INDEX))) len += strlen (":spacing=100"); if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX)))