From 72c2a3e79db207694bc765ff4fe976d540f5b036 Mon Sep 17 00:00:00 2001 From: pstef Date: Thu, 21 May 2020 17:34:31 +0000 Subject: [PATCH] indent(1): add fallthrough markers This silences -Wimplicit-fallthrough warnings. Submitted by: Michael Paquier Obtained from: postgresql.org MFC after: 3 days --- usr.bin/indent/indent.c | 1 + usr.bin/indent/parse.c | 1 + 2 files changed, 2 insertions(+) diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index b9dfe5f89537..7af4c6ae17c6 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -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) { diff --git a/usr.bin/indent/parse.c b/usr.bin/indent/parse.c index fc5f80311523..68e07bc922e7 100644 --- a/usr.bin/indent/parse.c +++ b/usr.bin/indent/parse.c @@ -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;