0
0
mirror of https://github.com/vim/vim.git synced 2025-09-01 21:03:39 -04:00

patch 8.0.1215: newer gcc warns for implicit fallthrough

Problem:    Newer gcc warns for implicit fallthrough.
Solution:   Consistently use a FALLTHROUGH comment. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar 2017-10-24 21:49:36 +02:00
parent 4f1982800f
commit 2f40d129bf
14 changed files with 39 additions and 29 deletions

View File

@ -4325,6 +4325,7 @@ build_stl_str_hl(
case STL_OFFSET_X:
base = 'X';
/* FALLTHROUGH */
case STL_OFFSET:
#ifdef FEAT_BYTEOFF
l = ml_find_line_or_offset(wp->w_buffer, wp->w_cursor.lnum, NULL);
@ -4336,6 +4337,7 @@ build_stl_str_hl(
case STL_BYTEVAL_X:
base = 'X';
/* FALLTHROUGH */
case STL_BYTEVAL:
num = byteval;
if (num == NL)

View File

@ -5774,13 +5774,16 @@ quote_meta(char_u *dest, char_u *src, int len)
if (ctrl_x_mode == CTRL_X_DICTIONARY
|| ctrl_x_mode == CTRL_X_THESAURUS)
break;
/* FALLTHROUGH */
case '~':
if (!p_magic) /* quote these only if magic is set */
break;
/* FALLTHROUGH */
case '\\':
if (ctrl_x_mode == CTRL_X_DICTIONARY
|| ctrl_x_mode == CTRL_X_THESAURUS)
break;
/* FALLTHROUGH */
case '^': /* currently it's not needed. */
case '$':
m++;

View File

@ -1563,9 +1563,8 @@ getcmdline(
break;
goto cmdline_not_changed;
}
/* FALLTHROUGH */
#ifdef FEAT_CMDHIST
/* FALLTHROUGH */
case K_UP:
case K_DOWN:
case K_S_UP:

View File

@ -1101,6 +1101,7 @@ perl_to_vim(SV *sv, typval_T *rettv)
rettv->vval.v_number = SvIV(sv);
break;
}
/* FALLTHROUGH */
case SVt_PV: /* string */
{
size_t len = 0;

View File

@ -670,7 +670,8 @@ emsg(char_u *s)
ex_exitval = 1;
/* Reset msg_silent, an error causes messages to be switched back on. */
/* Reset msg_silent, an error causes messages to be switched back on.
*/
msg_silent = 0;
cmd_silent = FALSE;

View File

@ -1945,6 +1945,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
AppendToRedobuff((char_u *)"!\r"); /* use any last used !cmd */
else
bangredo = TRUE; /* do_bang() will put cmd in redo buffer */
/* FALLTHROUGH */
case OP_INDENT:
case OP_COLON:

View File

@ -4698,6 +4698,7 @@ skip_add:
subs = addstate(l, state->out, subs, pim, off_arg);
break;
}
/* FALLTHROUGH */
case NFA_MCLOSE1:
case NFA_MCLOSE2:
case NFA_MCLOSE3:

View File

@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1215,
/**/
1214,
/**/

View File

@ -433,8 +433,8 @@ newwindow:
g_do_tagpreview = Prenum;
else
g_do_tagpreview = p_pvh;
/*FALLTHROUGH*/
#endif
/* FALLTHROUGH */
case ']':
case Ctrl_RSB:
CHECK_CMDWIN
@ -557,8 +557,8 @@ wingotofile:
g_do_tagpreview = Prenum;
else
g_do_tagpreview = p_pvh;
/*FALLTHROUGH*/
#endif
/* FALLTHROUGH */
case ']':
case Ctrl_RSB:
/* keep Visual mode, can select words to use as a tag */