* coding.c (ENCODE_ISO_CHARACTER): Use unsigned, not int,
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Sep 2011 01:28:59 +0000 (18:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Sep 2011 01:28:59 +0000 (18:28 -0700)
to store the unsigned result of ENCODE_CHAR.

src/ChangeLog
src/coding.c

index 2e632bc..d3ab346 100644 (file)
        Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
        (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
        (Fdefine_coding_system_internal): Check for charset-id overflow.
+       (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
+       result of ENCODE_CHAR.
        * coding.h: Adjust decls to match defn changes elsewhere.
        (struct coding_system):
        Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
index 704d26f..4450647 100644 (file)
@@ -4185,7 +4185,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
 
 #define ENCODE_ISO_CHARACTER(charset, c)                                  \
   do {                                                                    \
-    int code = ENCODE_CHAR ((charset), (c));                              \
+    unsigned code = ENCODE_CHAR ((charset), (c));                         \
                                                                           \
     if (CHARSET_DIMENSION (charset) == 1)                                 \
       ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code);                  \