Mercurial > emacs
changeset 91871:436548f01688
(Ffont_fill_gstring, Fget_font_glyphs): Fix compilation warnings.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 16 Feb 2008 14:48:26 +0000 |
parents | 5348213975e3 |
children | b4fb4f870fc9 |
files | src/font.c |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/font.c Sat Feb 16 12:40:42 2008 +0000 +++ b/src/font.c Sat Feb 16 14:48:26 2008 +0000 @@ -3494,10 +3494,13 @@ for (i = 0; i < len; i++) { Lisp_Object g = LGSTRING_GLYPH (gstring, i); + /* Shut up GCC warning in comparison with + MOST_POSITIVE_FIXNUM below. */ + EMACS_INT cod; c = STRING_CHAR_ADVANCE (p); - code = font->driver->encode_char (font, c); - if (code > MOST_POSITIVE_FIXNUM || code == FONT_INVALID_CODE) + cod = code = font->driver->encode_char (font, c); + if (cod > MOST_POSITIVE_FIXNUM || code == FONT_INVALID_CODE) break; LGLYPH_SET_FROM (g, i); LGLYPH_SET_TO (g, i); @@ -3520,10 +3523,13 @@ for (i = 0; i < len; i++) { Lisp_Object g = LGSTRING_GLYPH (gstring, i); + /* Shut up GCC warning in comparison with + MOST_POSITIVE_FIXNUM below. */ + EMACS_INT cod; FETCH_CHAR_ADVANCE (c, pos, pos_byte); - code = font->driver->encode_char (font, c); - if (code > MOST_POSITIVE_FIXNUM || code == FONT_INVALID_CODE) + cod = code = font->driver->encode_char (font, c); + if (cod > MOST_POSITIVE_FIXNUM || code == FONT_INVALID_CODE) break; LGLYPH_SET_FROM (g, i); LGLYPH_SET_TO (g, i); @@ -3961,13 +3967,14 @@ Lisp_Object val; int c = XINT (ch); unsigned code; + EMACS_INT cod; struct font_metrics metrics; - code = font->driver->encode_char (font, c); + cod = code = font->driver->encode_char (font, c); if (code == FONT_INVALID_CODE) continue; val = Fmake_vector (make_number (6), Qnil); - if (code <= MOST_POSITIVE_FIXNUM) + if (cod <= MOST_POSITIVE_FIXNUM) ASET (val, 0, make_number (code)); else ASET (val, 0, Fcons (make_number (code >> 16),