From: Eli Zaretskii Date: Fri, 29 Aug 2008 09:54:05 +0000 (+0000) Subject: (font_fill_lglyph_metrics): Use EMACS_INT in LGLYPH_SET_CODE to avoid X-Git-Tag: emacs-pretest-23.0.90~3149 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f62ab7c582bedb8473782733fc0b27634a842a99;p=emacs.git (font_fill_lglyph_metrics): Use EMACS_INT in LGLYPH_SET_CODE to avoid compiler warnings. --- diff --git a/src/font.c b/src/font.c index 037a92a33a8..340b69869a1 100644 --- a/src/font.c +++ b/src/font.c @@ -4195,10 +4195,13 @@ font_fill_lglyph_metrics (glyph, font_object) Lisp_Object glyph, font_object; { struct font *font = XFONT_OBJECT (font_object); - unsigned code = font->driver->encode_char (font, LGLYPH_CHAR (glyph)); + unsigned code; + /* ecode used in LGLYPH_SET_CODE to avoid compiler warnings. */ + EMACS_INT ecode = font->driver->encode_char (font, LGLYPH_CHAR (glyph)); struct font_metrics metrics; - LGLYPH_SET_CODE (glyph, code); + LGLYPH_SET_CODE (glyph, ecode); + code = ecode; font->driver->text_extents (font, &code, 1, &metrics); LGLYPH_SET_LBEARING (glyph, metrics.lbearing); LGLYPH_SET_RBEARING (glyph, metrics.rbearing);