summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-05-16 10:24:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-05-16 10:27:41 -0700
commit2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f (patch)
tree869b2d36a6a07dca857254202d620358c004489f /lib-src
parent138c8256f41f242341c7d146c99f4e6fa267a638 (diff)
downloademacs-2e1bebe279b7108f74c3a1e7e30e8a43c2cfa31f.tar.gz
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 'lib-src')
-rw-r--r--lib-src/ebrowse.c5
-rw-r--r--lib-src/etags.c28
2 files changed, 16 insertions, 17 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 623911027ce..51d181997b1 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -3059,8 +3059,7 @@ class_definition (struct sym *containing, int tag, int flags, int nested)
MATCH until we see something like `;' or `{'. */
while (!LOOKING_AT3 (';', YYEOF, '{'))
MATCH ();
- done = 1;
-
+ FALLTHROUGH;
case '{':
done = 1;
break;
@@ -3184,7 +3183,7 @@ declaration (int flags)
free (id);
return;
}
-
+ FALLTHROUGH;
case '=':
/* Assumed to be the start of an initialization in this
context. */
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 015cbbe0ef3..6f280d8ab40 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -1157,7 +1157,7 @@ main (int argc, char **argv)
case 'c':
/* Backward compatibility: support obsolete --ignore-case-regexp. */
optarg = concat (optarg, "i", ""); /* memory leak here */
- /* FALLTHRU */
+ FALLTHROUGH;
case 'r':
argbuffer[current_arg].arg_type = at_regexp;
argbuffer[current_arg].what = optarg;
@@ -1192,7 +1192,7 @@ main (int argc, char **argv)
case 't': typedefs = true; break;
case 'T': typedefs = typedefs_or_cplusplus = true; break;
case 'u': update = true; break;
- case 'v': vgrind_style = true; /*FALLTHRU*/
+ case 'v': vgrind_style = true; FALLTHROUGH;
case 'x': cxref_style = true; break;
case 'w': no_warnings = true; break;
default:
@@ -2564,7 +2564,7 @@ hash (const char *str, int len)
{
default:
hval += asso_values[(unsigned char) str[2]];
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case 2:
hval += asso_values[(unsigned char) str[1]];
break;
@@ -3013,7 +3013,7 @@ consider_token (char *str, int len, int c, int *c_extp,
*c_extp = (*c_extp | C_PLPL) & ~C_AUTO;
if (toktype == st_C_template)
break;
- /* FALLTHRU */
+ FALLTHROUGH;
case st_C_struct:
case st_C_enum:
if (parlev == 0
@@ -3176,7 +3176,7 @@ consider_token (char *str, int len, int c, int *c_extp,
default:
break;
}
- /* FALLTHRU */
+ FALLTHROUGH;
case fvnameseen:
if (len >= 10 && strneq (str+len-10, "::operator", 10))
{
@@ -3387,7 +3387,7 @@ C_entries (int c_ext, FILE *inf)
case '\0':
/* Hmmm, something went wrong. */
CNL ();
- /* FALLTHRU */
+ FALLTHROUGH;
case '\'':
inchar = false;
break;
@@ -3828,7 +3828,7 @@ C_entries (int c_ext, FILE *inf)
|| (members
&& plainc && instruct))
make_C_tag (true); /* a function */
- /* FALLTHRU */
+ FALLTHROUGH;
default:
fvextern = false;
fvdef = fvnone;
@@ -3838,7 +3838,7 @@ C_entries (int c_ext, FILE *inf)
else
token.valid = false;
} /* switch (fvdef) */
- /* FALLTHRU */
+ FALLTHROUGH;
default:
if (!instruct)
typdef = tnone;
@@ -3926,7 +3926,7 @@ C_entries (int c_ext, FILE *inf)
|| (globals && bracelev == 0
&& (!fvextern || declarations)))
make_C_tag (false); /* a variable */
- /* FALLTHRU */
+ FALLTHROUGH;
default:
fvdef = fvnone;
}
@@ -3959,7 +3959,7 @@ C_entries (int c_ext, FILE *inf)
fvdef = fignore;
break;
}
- /* FALLTHRU */
+ FALLTHROUGH;
case foperator:
fvdef = fstartlist;
break;
@@ -4049,7 +4049,7 @@ C_entries (int c_ext, FILE *inf)
}
}
make_C_tag (true); /* a function */
- /* FALLTHRU */
+ FALLTHROUGH;
case fignore:
fvdef = fvnone;
break;
@@ -4142,7 +4142,7 @@ C_entries (int c_ext, FILE *inf)
if ((members && bracelev == 1)
|| (globals && bracelev == 0 && (!fvextern || declarations)))
make_C_tag (false); /* a variable */
- /* FALLTHRU */
+ FALLTHROUGH;
default:
fvdef = vignore;
}
@@ -4169,7 +4169,7 @@ C_entries (int c_ext, FILE *inf)
objdef = omethodsign;
break;
}
- /* FALLTHRU */
+ FALLTHROUGH;
resetfvdef:
case '#': case '~': case '&': case '%': case '/':
case '|': case '^': case '!': case '.': case '?':
@@ -6354,7 +6354,7 @@ add_regex (char *regexp_pattern, language *lang)
break;
case 's':
single_line = true;
- /* FALLTHRU */
+ FALLTHROUGH;
case 'm':
multi_line = true;
need_filebuf = true;