aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-05-16 10:24:19 -0700
committerPaul Eggert2017-05-16 10:27:41 -0700
commit2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch)
tree869b2d36a6a07dca857254202d620358c004489f /src
parent138c8256f41f242341c7d146c99f4e6fa267a638 (diff)
downloademacs-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')
-rw-r--r--src/bidi.c2
-rw-r--r--src/callint.c1
-rw-r--r--src/ccl.c4
-rw-r--r--src/coding.c4
-rw-r--r--src/conf_post.h6
-rw-r--r--src/data.c2
-rw-r--r--src/doprnt.c1
-rw-r--r--src/editfns.c10
-rw-r--r--src/eval.c20
-rw-r--r--src/filelock.c2
-rw-r--r--src/gnutls.c1
-rw-r--r--src/gtkutil.c14
-rw-r--r--src/indent.c1
-rw-r--r--src/lread.c10
-rw-r--r--src/regex.c8
-rw-r--r--src/search.c1
-rw-r--r--src/syntax.c8
-rw-r--r--src/xterm.c8
18 files changed, 59 insertions, 44 deletions
diff --git a/src/bidi.c b/src/bidi.c
index b75ad933626..dce0bf695f6 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2092,7 +2092,7 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
2092 type = RLI; 2092 type = RLI;
2093 bidi_it->orig_type = type; 2093 bidi_it->orig_type = type;
2094 } 2094 }
2095 /* FALLTHROUGH */ 2095 FALLTHROUGH;
2096 case RLI: /* X5a */ 2096 case RLI: /* X5a */
2097 if (override == NEUTRAL_DIR) 2097 if (override == NEUTRAL_DIR)
2098 bidi_it->type_after_wn = type; 2098 bidi_it->type_after_wn = type;
diff --git a/src/callint.c b/src/callint.c
index d96454883cf..96436116c8b 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -690,6 +690,7 @@ invoke it. If KEYS is omitted or nil, the return value of
690 case 'N': /* Prefix arg as number, else number from minibuffer. */ 690 case 'N': /* Prefix arg as number, else number from minibuffer. */
691 if (!NILP (prefix_arg)) 691 if (!NILP (prefix_arg))
692 goto have_prefix_arg; 692 goto have_prefix_arg;
693 FALLTHROUGH;
693 case 'n': /* Read number from minibuffer. */ 694 case 'n': /* Read number from minibuffer. */
694 args[i] = call1 (Qread_number, callint_message); 695 args[i] = call1 (Qread_number, callint_message);
695 /* Passing args[i] directly stimulates compiler bug. */ 696 /* Passing args[i] directly stimulates compiler bug. */
diff --git a/src/ccl.c b/src/ccl.c
index 90bd2f46794..b2caf413f7a 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1000,7 +1000,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1000 1000
1001 case CCL_ReadBranch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ 1001 case CCL_ReadBranch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */
1002 CCL_READ_CHAR (reg[rrr]); 1002 CCL_READ_CHAR (reg[rrr]);
1003 /* fall through ... */ 1003 FALLTHROUGH;
1004 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ 1004 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */
1005 { 1005 {
1006 int ioff = 0 <= reg[rrr] && reg[rrr] < field1 ? reg[rrr] : field1; 1006 int ioff = 0 <= reg[rrr] && reg[rrr] < field1 ? reg[rrr] : field1;
@@ -1174,6 +1174,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1174 1174
1175 case CCL_ReadJumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */ 1175 case CCL_ReadJumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */
1176 CCL_READ_CHAR (reg[rrr]); 1176 CCL_READ_CHAR (reg[rrr]);
1177 FALLTHROUGH;
1177 case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */ 1178 case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */
1178 i = reg[rrr]; 1179 i = reg[rrr];
1179 jump_address = ic + ADDR; 1180 jump_address = ic + ADDR;
@@ -1184,6 +1185,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1184 1185
1185 case CCL_ReadJumpCondExprReg: /* A--D--D--R--E--S--S-rrrXXXXX */ 1186 case CCL_ReadJumpCondExprReg: /* A--D--D--R--E--S--S-rrrXXXXX */
1186 CCL_READ_CHAR (reg[rrr]); 1187 CCL_READ_CHAR (reg[rrr]);
1188 FALLTHROUGH;
1187 case CCL_JumpCondExprReg: 1189 case CCL_JumpCondExprReg:
1188 i = reg[rrr]; 1190 i = reg[rrr];
1189 jump_address = ic + ADDR; 1191 jump_address = ic + ADDR;
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 */
diff --git a/src/conf_post.h b/src/conf_post.h
index 95ebd5511ca..4fc0428df5a 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -244,6 +244,12 @@ extern int emacs_setenv_TZ (char const *);
244# define ATTRIBUTE_FORMAT(spec) /* empty */ 244# define ATTRIBUTE_FORMAT(spec) /* empty */
245#endif 245#endif
246 246
247#if GNUC_PREREQ (7, 0, 0)
248# define FALLTHROUGH __attribute__ ((__fallthrough__))
249#else
250# define FALLTHROUGH ((void) 0)
251#endif
252
247#if GNUC_PREREQ (4, 4, 0) && defined __GLIBC_MINOR__ 253#if GNUC_PREREQ (4, 4, 0) && defined __GLIBC_MINOR__
248# define PRINTF_ARCHETYPE __gnu_printf__ 254# define PRINTF_ARCHETYPE __gnu_printf__
249#elif GNUC_PREREQ (4, 4, 0) && defined __MINGW32__ 255#elif GNUC_PREREQ (4, 4, 0) && defined __MINGW32__
diff --git a/src/data.c b/src/data.c
index 44f7ba0e881..3ff2a809744 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2153,7 +2153,7 @@ If the current binding is global (the default), the value is nil. */)
2153 else if (!BUFFER_OBJFWDP (valcontents)) 2153 else if (!BUFFER_OBJFWDP (valcontents))
2154 return Qnil; 2154 return Qnil;
2155 } 2155 }
2156 /* FALLTHROUGH */ 2156 FALLTHROUGH;
2157 case SYMBOL_LOCALIZED: 2157 case SYMBOL_LOCALIZED:
2158 /* For a local variable, record both the symbol and which 2158 /* For a local variable, record both the symbol and which
2159 buffer's or frame's value we are saving. */ 2159 buffer's or frame's value we are saving. */
diff --git a/src/doprnt.c b/src/doprnt.c
index 09051adc053..bed9350f4a6 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -352,6 +352,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
352 352
353 case 'S': 353 case 'S':
354 string[-1] = 's'; 354 string[-1] = 's';
355 FALLTHROUGH;
355 case 's': 356 case 's':
356 if (fmtcpy[1] != 's') 357 if (fmtcpy[1] != 's')
357 minlen = atoi (&fmtcpy[1]); 358 minlen = atoi (&fmtcpy[1]);
diff --git a/src/editfns.c b/src/editfns.c
index 38530437a2f..ecb8e3f0838 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1595,10 +1595,10 @@ time_arith (Lisp_Object a, Lisp_Object b,
1595 { 1595 {
1596 default: 1596 default:
1597 val = Fcons (make_number (t.ps), val); 1597 val = Fcons (make_number (t.ps), val);
1598 /* Fall through. */ 1598 FALLTHROUGH;
1599 case 3: 1599 case 3:
1600 val = Fcons (make_number (t.us), val); 1600 val = Fcons (make_number (t.us), val);
1601 /* Fall through. */ 1601 FALLTHROUGH;
1602 case 2: 1602 case 2:
1603 val = Fcons (make_number (t.lo), val); 1603 val = Fcons (make_number (t.lo), val);
1604 val = Fcons (make_number (t.hi), val); 1604 val = Fcons (make_number (t.hi), val);
@@ -4072,8 +4072,8 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4072 } 4072 }
4073 4073
4074 /* Ignore flags when sprintf ignores them. */ 4074 /* Ignore flags when sprintf ignores them. */
4075 space_flag &= ~ plus_flag; 4075 space_flag &= ! plus_flag;
4076 zero_flag &= ~ minus_flag; 4076 zero_flag &= ! minus_flag;
4077 4077
4078 char *num_end; 4078 char *num_end;
4079 uintmax_t raw_field_width = strtoumax (format, &num_end, 10); 4079 uintmax_t raw_field_width = strtoumax (format, &num_end, 10);
@@ -4311,7 +4311,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4311 { 4311 {
4312 memcpy (f, pMd, pMlen); 4312 memcpy (f, pMd, pMlen);
4313 f += pMlen; 4313 f += pMlen;
4314 zero_flag &= ~ precision_given; 4314 zero_flag &= ! precision_given;
4315 } 4315 }
4316 *f++ = conversion; 4316 *f++ = conversion;
4317 *f = '\0'; 4317 *f = '\0';
diff --git a/src/eval.c b/src/eval.c
index 848955c2794..98d25cc4fed 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3212,7 +3212,7 @@ do_specbind (struct Lisp_Symbol *sym, union specbinding *bind,
3212 set_default_internal (specpdl_symbol (bind), value, bindflag); 3212 set_default_internal (specpdl_symbol (bind), value, bindflag);
3213 return; 3213 return;
3214 } 3214 }
3215 /* FALLTHROUGH */ 3215 FALLTHROUGH;
3216 case SYMBOL_LOCALIZED: 3216 case SYMBOL_LOCALIZED:
3217 set_internal (specpdl_symbol (bind), value, Qnil, bindflag); 3217 set_internal (specpdl_symbol (bind), value, Qnil, bindflag);
3218 break; 3218 break;
@@ -3390,12 +3390,10 @@ do_one_unbind (union specbinding *this_binding, bool unwinding,
3390 Qnil, bindflag); 3390 Qnil, bindflag);
3391 break; 3391 break;
3392 } 3392 }
3393 else
3394 { /* FALLTHROUGH!!
3395 NOTE: we only ever come here if make_local_foo was used for
3396 the first time on this var within this let. */
3397 }
3398 } 3393 }
3394 /* Come here only if make_local_foo was used for the first time
3395 on this var within this let. */
3396 FALLTHROUGH;
3399 case SPECPDL_LET_DEFAULT: 3397 case SPECPDL_LET_DEFAULT:
3400 set_default_internal (specpdl_symbol (this_binding), 3398 set_default_internal (specpdl_symbol (this_binding),
3401 specpdl_old_value (this_binding), 3399 specpdl_old_value (this_binding),
@@ -3676,12 +3674,10 @@ backtrace_eval_unrewind (int distance)
3676 SET_SYMBOL_VAL (XSYMBOL (sym), old_value); 3674 SET_SYMBOL_VAL (XSYMBOL (sym), old_value);
3677 break; 3675 break;
3678 } 3676 }
3679 else
3680 { /* FALLTHROUGH!!
3681 NOTE: we only ever come here if make_local_foo was used for
3682 the first time on this var within this let. */
3683 }
3684 } 3677 }
3678 /* Come here only if make_local_foo was used for the first
3679 time on this var within this let. */
3680 FALLTHROUGH;
3685 case SPECPDL_LET_DEFAULT: 3681 case SPECPDL_LET_DEFAULT:
3686 { 3682 {
3687 Lisp_Object sym = specpdl_symbol (tmp); 3683 Lisp_Object sym = specpdl_symbol (tmp);
@@ -3837,7 +3833,7 @@ mark_specpdl (union specbinding *first, union specbinding *ptr)
3837 case SPECPDL_LET_DEFAULT: 3833 case SPECPDL_LET_DEFAULT:
3838 case SPECPDL_LET_LOCAL: 3834 case SPECPDL_LET_LOCAL:
3839 mark_object (specpdl_where (pdl)); 3835 mark_object (specpdl_where (pdl));
3840 /* Fall through. */ 3836 FALLTHROUGH;
3841 case SPECPDL_LET: 3837 case SPECPDL_LET:
3842 mark_object (specpdl_symbol (pdl)); 3838 mark_object (specpdl_symbol (pdl));
3843 mark_object (specpdl_old_value (pdl)); 3839 mark_object (specpdl_old_value (pdl));
diff --git a/src/filelock.c b/src/filelock.c
index 67e8dbd34ed..bfa1d63d833 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -569,7 +569,7 @@ current_lock_owner (lock_info_type *owner, char *lfname)
569 if (! (boot[0] == '\200' && boot[1] == '\242')) 569 if (! (boot[0] == '\200' && boot[1] == '\242'))
570 return -1; 570 return -1;
571 boot += 2; 571 boot += 2;
572 /* Fall through. */ 572 FALLTHROUGH;
573 case ':': 573 case ':':
574 if (! c_isdigit (boot[0])) 574 if (! c_isdigit (boot[0]))
575 return -1; 575 return -1;
diff --git a/src/gnutls.c b/src/gnutls.c
index 28ab10de05c..2078ad88f28 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -605,6 +605,7 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
605 max_log_level, 605 max_log_level,
606 "retry:", 606 "retry:",
607 str); 607 str);
608 FALLTHROUGH;
608 default: 609 default:
609 GNUTLS_LOG2 (1, 610 GNUTLS_LOG2 (1,
610 max_log_level, 611 max_log_level,
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 1b63293fe55..16eb284d7c7 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -554,10 +554,11 @@ xg_check_special_colors (struct frame *f,
554 else 554 else
555 gtk_style_context_get_background_color (gsty, state, &col); 555 gtk_style_context_get_background_color (gsty, state, &col);
556 556
557 sprintf (buf, "rgb:%04x/%04x/%04x", 557 unsigned short
558 (unsigned) (col.red * 65535), 558 r = col.red * 65535,
559 (unsigned) (col.green * 65535), 559 g = col.green * 65535,
560 (unsigned) (col.blue * 65535)); 560 b = col.blue * 65535;
561 sprintf (buf, "rgb:%04x/%04x/%04x", r, g, b);
561 success_p = x_parse_color (f, buf, color) != 0; 562 success_p = x_parse_color (f, buf, color) != 0;
562#else 563#else
563 GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); 564 GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f));
@@ -3856,7 +3857,6 @@ xg_update_scrollbar_pos (struct frame *f,
3856 GtkWidget *wparent = gtk_widget_get_parent (wscroll); 3857 GtkWidget *wparent = gtk_widget_get_parent (wscroll);
3857 gint msl; 3858 gint msl;
3858 int scale = xg_get_gdk_scale (); 3859 int scale = xg_get_gdk_scale ();
3859 bool hidden;
3860 3860
3861 top /= scale; 3861 top /= scale;
3862 left /= scale; 3862 left /= scale;
@@ -3875,13 +3875,13 @@ xg_update_scrollbar_pos (struct frame *f,
3875 /* Move and resize to new values. */ 3875 /* Move and resize to new values. */
3876 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); 3876 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
3877 gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL); 3877 gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
3878 if (msl > height) 3878 bool hidden = height < msl;
3879 if (hidden)
3879 { 3880 {
3880 /* No room. Hide scroll bar as some themes output a warning if 3881 /* No room. Hide scroll bar as some themes output a warning if
3881 the height is less than the min size. */ 3882 the height is less than the min size. */
3882 gtk_widget_hide (wparent); 3883 gtk_widget_hide (wparent);
3883 gtk_widget_hide (wscroll); 3884 gtk_widget_hide (wscroll);
3884 hidden = true;
3885 } 3885 }
3886 else 3886 else
3887 { 3887 {
diff --git a/src/indent.c b/src/indent.c
index f630ebb847c..adecc3622a8 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -925,6 +925,7 @@ position_indentation (ptrdiff_t pos_byte)
925 case 0240: 925 case 0240:
926 if (! NILP (BVAR (current_buffer, enable_multibyte_characters))) 926 if (! NILP (BVAR (current_buffer, enable_multibyte_characters)))
927 return column; 927 return column;
928 FALLTHROUGH;
928 case ' ': 929 case ' ':
929 column++; 930 column++;
930 break; 931 break;
diff --git a/src/lread.c b/src/lread.c
index c03aad4f722..5e737d690c6 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2309,6 +2309,7 @@ read_escape (Lisp_Object readcharfun, bool stringp)
2309 c = READCHAR; 2309 c = READCHAR;
2310 if (c != '-') 2310 if (c != '-')
2311 error ("Invalid escape character syntax"); 2311 error ("Invalid escape character syntax");
2312 FALLTHROUGH;
2312 case '^': 2313 case '^':
2313 c = READCHAR; 2314 c = READCHAR;
2314 if (c == '\\') 2315 if (c == '\\')
@@ -2399,6 +2400,7 @@ read_escape (Lisp_Object readcharfun, bool stringp)
2399 case 'U': 2400 case 'U':
2400 /* Post-Unicode-2.0: Up to eight hex chars. */ 2401 /* Post-Unicode-2.0: Up to eight hex chars. */
2401 unicode_hex_count = 8; 2402 unicode_hex_count = 8;
2403 FALLTHROUGH;
2402 case 'u': 2404 case 'u':
2403 2405
2404 /* A Unicode escape. We only permit them in strings and characters, 2406 /* A Unicode escape. We only permit them in strings and characters,
@@ -3278,11 +3280,11 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3278 *pch = c; 3280 *pch = c;
3279 return Qnil; 3281 return Qnil;
3280 } 3282 }
3281
3282 /* Otherwise, we fall through! Note that the atom-reading loop
3283 below will now loop at least once, assuring that we will not
3284 try to UNREAD two characters in a row. */
3285 } 3283 }
3284 /* The atom-reading loop below will now loop at least once,
3285 assuring that we will not try to UNREAD two characters in a
3286 row. */
3287 FALLTHROUGH;
3286 default: 3288 default:
3287 default_label: 3289 default_label:
3288 if (c <= 040) goto retry; 3290 if (c <= 040) goto retry;
diff --git a/src/regex.c b/src/regex.c
index 8e38a920cdb..ed848902086 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -2636,6 +2636,7 @@ regex_compile (const_re_char *pattern, size_t size,
2636 if ((syntax & RE_BK_PLUS_QM) 2636 if ((syntax & RE_BK_PLUS_QM)
2637 || (syntax & RE_LIMITED_OPS)) 2637 || (syntax & RE_LIMITED_OPS))
2638 goto normal_char; 2638 goto normal_char;
2639 FALLTHROUGH;
2639 handle_plus: 2640 handle_plus:
2640 case '*': 2641 case '*':
2641 /* If there is no previous pattern... */ 2642 /* If there is no previous pattern... */
@@ -3086,6 +3087,7 @@ regex_compile (const_re_char *pattern, size_t size,
3086 with non-0. */ 3087 with non-0. */
3087 if (regnum == 0) 3088 if (regnum == 0)
3088 FREE_STACK_RETURN (REG_BADPAT); 3089 FREE_STACK_RETURN (REG_BADPAT);
3090 FALLTHROUGH;
3089 case '1': case '2': case '3': case '4': 3091 case '1': case '2': case '3': case '4':
3090 case '5': case '6': case '7': case '8': case '9': 3092 case '5': case '6': case '7': case '8': case '9':
3091 regnum = 10*regnum + (c - '0'); break; 3093 regnum = 10*regnum + (c - '0'); break;
@@ -3905,8 +3907,7 @@ analyze_first (const_re_char *p, const_re_char *pend, char *fastmap,
3905 j < (1 << BYTEWIDTH); j++) 3907 j < (1 << BYTEWIDTH); j++)
3906 fastmap[j] = 1; 3908 fastmap[j] = 1;
3907 } 3909 }
3908 3910 FALLTHROUGH;
3909 /* Fallthrough */
3910 case charset: 3911 case charset:
3911 if (!fastmap) break; 3912 if (!fastmap) break;
3912 not = (re_opcode_t) *(p - 1) == charset_not; 3913 not = (re_opcode_t) *(p - 1) == charset_not;
@@ -6182,8 +6183,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
6182 case on_failure_jump_nastyloop: 6183 case on_failure_jump_nastyloop:
6183 assert ((re_opcode_t)pat[-2] == no_op); 6184 assert ((re_opcode_t)pat[-2] == no_op);
6184 PUSH_FAILURE_POINT (pat - 2, str); 6185 PUSH_FAILURE_POINT (pat - 2, str);
6185 /* Fallthrough */ 6186 FALLTHROUGH;
6186
6187 case on_failure_jump_loop: 6187 case on_failure_jump_loop:
6188 case on_failure_jump: 6188 case on_failure_jump:
6189 case succeed_n: 6189 case succeed_n:
diff --git a/src/search.c b/src/search.c
index 1223cbf07cc..19e789dfa87 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1804,6 +1804,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
1804 { 1804 {
1805 /* Setup translate_prev_byte1/2/3/4 from CHAR_BASE. Only a 1805 /* Setup translate_prev_byte1/2/3/4 from CHAR_BASE. Only a
1806 byte following them are the target of translation. */ 1806 byte following them are the target of translation. */
1807 eassume (0x80 <= char_base && char_base <= MAX_CHAR);
1807 unsigned char str[MAX_MULTIBYTE_LENGTH]; 1808 unsigned char str[MAX_MULTIBYTE_LENGTH];
1808 int cblen = CHAR_STRING (char_base, str); 1809 int cblen = CHAR_STRING (char_base, str);
1809 1810
diff --git a/src/syntax.c b/src/syntax.c
index 7aa43e6e5c7..dcaca22f0e2 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -810,6 +810,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
810 case Sstring_fence: 810 case Sstring_fence:
811 case Scomment_fence: 811 case Scomment_fence:
812 c = (code == Sstring_fence ? ST_STRING_STYLE : ST_COMMENT_STYLE); 812 c = (code == Sstring_fence ? ST_STRING_STYLE : ST_COMMENT_STYLE);
813 FALLTHROUGH;
813 case Sstring: 814 case Sstring:
814 /* Track parity of quotes. */ 815 /* Track parity of quotes. */
815 if (string_style == -1) 816 if (string_style == -1)
@@ -2690,6 +2691,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
2690 goto lose; 2691 goto lose;
2691 INC_BOTH (from, from_byte); 2692 INC_BOTH (from, from_byte);
2692 /* Treat following character as a word constituent. */ 2693 /* Treat following character as a word constituent. */
2694 FALLTHROUGH;
2693 case Sword: 2695 case Sword:
2694 case Ssymbol: 2696 case Ssymbol:
2695 if (depth || !sexpflag) break; 2697 if (depth || !sexpflag) break;
@@ -2721,7 +2723,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
2721 2723
2722 case Scomment_fence: 2724 case Scomment_fence:
2723 comstyle = ST_COMMENT_STYLE; 2725 comstyle = ST_COMMENT_STYLE;
2724 /* FALLTHROUGH */ 2726 FALLTHROUGH;
2725 case Scomment: 2727 case Scomment:
2726 if (!parse_sexp_ignore_comments) break; 2728 if (!parse_sexp_ignore_comments) break;
2727 UPDATE_SYNTAX_TABLE_FORWARD (from); 2729 UPDATE_SYNTAX_TABLE_FORWARD (from);
@@ -2753,7 +2755,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
2753 goto close1; 2755 goto close1;
2754 } 2756 }
2755 mathexit = 1; 2757 mathexit = 1;
2756 2758 FALLTHROUGH;
2757 case Sopen: 2759 case Sopen:
2758 if (!++depth) goto done; 2760 if (!++depth) goto done;
2759 break; 2761 break;
@@ -2909,7 +2911,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
2909 goto open2; 2911 goto open2;
2910 } 2912 }
2911 mathexit = 1; 2913 mathexit = 1;
2912 2914 FALLTHROUGH;
2913 case Sclose: 2915 case Sclose:
2914 if (!++depth) goto done2; 2916 if (!++depth) goto done2;
2915 break; 2917 break;
diff --git a/src/xterm.c b/src/xterm.c
index e9068830f85..c8836b7ca78 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2005,9 +2005,9 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
2005 } 2005 }
2006 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) 2006 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE)
2007 { 2007 {
2008 sprintf (buf, "%0*X", 2008 unsigned int ch = glyph->u.glyphless.ch;
2009 glyph->u.glyphless.ch < 0x10000 ? 4 : 6, 2009 eassume (ch <= MAX_CHAR);
2010 glyph->u.glyphless.ch + 0u); 2010 sprintf (buf, "%0*X", ch < 0x10000 ? 4 : 6, ch);
2011 str = buf; 2011 str = buf;
2012 } 2012 }
2013 2013
@@ -8949,7 +8949,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
8949 { 8949 {
8950 case MappingModifier: 8950 case MappingModifier:
8951 x_find_modifier_meanings (dpyinfo); 8951 x_find_modifier_meanings (dpyinfo);
8952 /* This is meant to fall through. */ 8952 FALLTHROUGH;
8953 case MappingKeyboard: 8953 case MappingKeyboard:
8954 XRefreshKeyboardMapping ((XMappingEvent *) &event->xmapping); 8954 XRefreshKeyboardMapping ((XMappingEvent *) &event->xmapping);
8955 } 8955 }