changeset 97853:fa1023e4960c

(font_fill_lglyph_metrics): Use EMACS_INT in LGLYPH_SET_CODE to avoid compiler warnings.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 29 Aug 2008 09:54:05 +0000
parents 951870b6c085
children a361f652d863
files src/font.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Fri Aug 29 09:27:26 2008 +0000
+++ b/src/font.c	Fri Aug 29 09:54:05 2008 +0000
@@ -4195,10 +4195,13 @@
      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);