diff options
| author | Paul Eggert | 2017-05-16 10:24:19 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-16 10:27:41 -0700 |
| commit | 2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch) | |
| tree | 869b2d36a6a07dca857254202d620358c004489f /src/coding.c | |
| parent | 138c8256f41f242341c7d146c99f4e6fa267a638 (diff) | |
| download | emacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.tar.gz emacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.zip | |
Merge with gnulib, pacifying GCC 7
This incorporates:
2017-05-16 manywarnings: update for GCC 7
2017-05-15 sys_select: Avoid "was expanded before it was required"
* configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
-Wformat-overflow=2 options, due to too many false alarms.
* doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
* src/coding.c (decode_coding_iso_2022):
Fix bug uncovered by -Wimplicit-fallthrough.
* src/conf_post.h (FALLTHROUGH): New macro.
Use it to mark all switch cases that fall through.
* src/editfns.c (styled_format): Use !, not ~, on bool.
* src/gtkutil.c (xg_check_special_colors):
When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
(xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
this bug was actually caught by Clang.
* src/search.c (boyer_moore):
Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Tell GCC that glyph->u.glyphless.ch must be a character.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index 367a9759848..5682fc015ad 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -3611,7 +3611,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3611 | || CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) | 3611 | || CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) |
| 3612 | goto invalid_code; | 3612 | goto invalid_code; |
| 3613 | /* This is a graphic character, we fall down ... */ | 3613 | /* This is a graphic character, we fall down ... */ |
| 3614 | 3614 | FALLTHROUGH; | |
| 3615 | case ISO_graphic_plane_1: | 3615 | case ISO_graphic_plane_1: |
| 3616 | if (charset_id_1 < 0) | 3616 | if (charset_id_1 < 0) |
| 3617 | goto invalid_code; | 3617 | goto invalid_code; |
| @@ -3646,6 +3646,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3646 | case ISO_single_shift_2_7: | 3646 | case ISO_single_shift_2_7: |
| 3647 | if (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS)) | 3647 | if (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS)) |
| 3648 | goto invalid_code; | 3648 | goto invalid_code; |
| 3649 | FALLTHROUGH; | ||
| 3649 | case ISO_single_shift_2: | 3650 | case ISO_single_shift_2: |
| 3650 | if (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SINGLE_SHIFT)) | 3651 | if (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SINGLE_SHIFT)) |
| 3651 | goto invalid_code; | 3652 | goto invalid_code; |
| @@ -3797,6 +3798,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3797 | { | 3798 | { |
| 3798 | case ']': /* end of the current direction */ | 3799 | case ']': /* end of the current direction */ |
| 3799 | coding->mode &= ~CODING_MODE_DIRECTION; | 3800 | coding->mode &= ~CODING_MODE_DIRECTION; |
| 3801 | break; | ||
| 3800 | 3802 | ||
| 3801 | case '0': /* end of the current direction */ | 3803 | case '0': /* end of the current direction */ |
| 3802 | case '1': /* start of left-to-right direction */ | 3804 | case '1': /* start of left-to-right direction */ |