1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

(Finternal_char_font): Fix compilation warning.

This commit is contained in:
Glenn Morris 2008-02-16 22:33:01 +00:00
parent 790df30953
commit be61736756
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008-02-16 Glenn Morris <rgm@gnu.org>
* fontset.c (Finternal_char_font): Fix compilation warning.
2008-02-16 Eli Zaretskii <eliz@gnu.org>
* w32.c (init_user_info): Use TOKEN_USER and TOKEN_PRIMARY_GROUP

View File

@ -2065,10 +2065,13 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
struct font *font = XSAVE_VALUE (font_object)->pointer;
unsigned code = font->driver->encode_char (font, c);
Lisp_Object fontname = font_get_name (font_object);
/* Assignment to EMACS_INT stops GCC whining about limited range
of data type. */
EMACS_INT cod = code;
if (code == FONT_INVALID_CODE)
return Qnil;
if (code <= MOST_POSITIVE_FIXNUM)
if (cod <= MOST_POSITIVE_FIXNUM)
return Fcons (fontname, make_number (code));
return Fcons (fontname, Fcons (make_number (code >> 16),
make_number (code & 0xFFFF)));