indent(1): add fallthrough markers

This silences -Wimplicit-fallthrough warnings.

Submitted by:	Michael Paquier
Obtained from:	postgresql.org
MFC after:	3 days
This commit is contained in:
pstef 2020-05-21 17:34:31 +00:00
parent 9f543d5993
commit 72c2a3e79d
2 changed files with 2 additions and 0 deletions

View File

@ -967,6 +967,7 @@ main(int argc, char **argv)
case structure:
if (ps.p_l_follow > 0)
goto copy_id;
/* FALLTHROUGH */
case decl: /* we have a declaration type (int, etc.) */
parse(decl); /* let parser worry about indentation */
if (ps.last_token == rparen && ps.tos <= 1) {

View File

@ -107,6 +107,7 @@ parse(int tk) /* tk: the code for the construct scanned */
*/
ps.i_l_follow = ps.il[ps.tos--];
/* the rest is the same as for dolit and forstmt */
/* FALLTHROUGH */
case dolit: /* 'do' */
case forstmt: /* for (...) */
ps.p_stack[++ps.tos] = tk;