From: Paul Eggert Date: Tue, 5 Apr 2011 06:24:54 +0000 (-0700) Subject: * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~394^2~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b25d760e185c85e190402eddd0d756ddc014a58c;p=emacs.git * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int. This avoids several warnings with gcc -Wstrict-overflow. --- 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 + * 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) \