Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2020 17:34:31 +0000 (UTC)
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361337 - head/usr.bin/indent
Message-ID:  <202005211734.04LHYVON047006@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005211734.04LHYVON047006>