summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-04 23:24:54 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-04 23:24:54 -0700
commitb25d760e185c85e190402eddd0d756ddc014a58c (patch)
treef726f7d9a3d491d19215b4c3cfe98ff06cc636e9 /src
parent625a3eb1e23bd4000230946eadb419d5c454845b (diff)
downloademacs-b25d760e185c85e190402eddd0d756ddc014a58c.tar.gz
emacs-b25d760e185c85e190402eddd0d756ddc014a58c.tar.bz2
emacs-b25d760e185c85e190402eddd0d756ddc014a58c.zip
* coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
This avoids several warnings with gcc -Wstrict-overflow.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/coding.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d489dcd58b3..4e33ccb0c0d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2011-04-05 Paul Eggert <eggert@cs.ucla.edu>
+ * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
+ This avoids several warnings with gcc -Wstrict-overflow.
+
* xfont.c (xfont_text_extents): Remove var that was set but not used.
(xfont_open): Avoid unnecessary tests.
diff --git a/src/coding.c b/src/coding.c
index b7e8154107c..6e5d0655258 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -753,7 +753,7 @@ static struct coding_system coding_categories[coding_category_max];
produced_chars++; \
if (multibytep) \
{ \
- int ch = (c); \
+ unsigned ch = (c); \
if (ch >= 0x80) \
ch = BYTE8_TO_CHAR (ch); \
CHAR_STRING_ADVANCE (ch, dst); \
@@ -770,7 +770,7 @@ static struct coding_system coding_categories[coding_category_max];
produced_chars += 2; \
if (multibytep) \
{ \
- int ch; \
+ unsigned ch; \
\
ch = (c1); \
if (ch >= 0x80) \