From 47664caabe10c081360a1dcf58492163e9f5b43c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Sep 2011 18:28:59 -0700 Subject: [PATCH] * coding.c (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned result of ENCODE_CHAR. --- src/ChangeLog | 2 ++ src/coding.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2e632bc5ad8..d3ab346a380 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -169,6 +169,8 @@ 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. diff --git a/src/coding.c b/src/coding.c index 704d26f3f9b..44506476794 100644 --- a/src/coding.c +++ b/src/coding.c @@ -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); \ -- 2.39.2