svn commit: r361337 - head/usr.bin/indent
Piotr Pawel Stefaniak
pstef at FreeBSD.org
Thu May 21 17:34:32 UTC 2020
Author: pstef
Date: Thu May 21 17:34:31 2020
New Revision: 361337
URL: https://svnweb.freebsd.org/changeset/base/361337
Log:
indent(1): add fallthrough markers
This silences -Wimplicit-fallthrough warnings.
Submitted by: Michael Paquier
Obtained from: postgresql.org
MFC after: 3 days
Modified:
head/usr.bin/indent/indent.c
head/usr.bin/indent/parse.c
Modified: head/usr.bin/indent/indent.c
==============================================================================
--- head/usr.bin/indent/indent.c Thu May 21 15:53:16 2020 (r361336)
+++ head/usr.bin/indent/indent.c Thu May 21 17:34:31 2020 (r361337)
@@ -967,6 +967,7 @@ check_type:
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) {
Modified: head/usr.bin/indent/parse.c
==============================================================================
--- head/usr.bin/indent/parse.c Thu May 21 15:53:16 2020 (r361336)
+++ head/usr.bin/indent/parse.c Thu May 21 17:34:31 2020 (r361337)
@@ -107,6 +107,7 @@ parse(int tk) /* tk: the code for the construct scanne
*/
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;
More information about the svn-src-all
mailing list