From f7741ce9a0bc60a6c7d538e405122602f282b79d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 2 Dec 2008 22:47:20 +0000 Subject: [PATCH] (font_unparse_fcname): Fix use of uninitialized variable. --- src/ChangeLog | 2 ++ src/font.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) 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))) -- 2.39.2