From f62ab7c582bedb8473782733fc0b27634a842a99 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 29 Aug 2008 09:54:05 +0000 Subject: [PATCH] (font_fill_lglyph_metrics): Use EMACS_INT in LGLYPH_SET_CODE to avoid compiler warnings. --- src/font.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.5