From owner-svn-src-all@freebsd.org Tue Aug 23 01:58:04 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 369D0BC0F4A; Tue, 23 Aug 2016 01:58:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06CD3178E; Tue, 23 Aug 2016 01:58:03 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7N1w3g6025160; Tue, 23 Aug 2016 01:58:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7N1w3Tw025158; Tue, 23 Aug 2016 01:58:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201608230158.u7N1w3Tw025158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 23 Aug 2016 01:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304651 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 01:58:04 -0000 Author: pfg Date: Tue Aug 23 01:58:02 2016 New Revision: 304651 URL: https://svnweb.freebsd.org/changeset/base/304651 Log: indent(1): add some comments to quiet down Coverity. Hopefully adding comments should help explain the code to both static checkers and humans. CID: 976543, 976544, 976545 Obtained from: Piotr Stephaniak Modified: head/usr.bin/indent/io.c head/usr.bin/indent/parse.c Modified: head/usr.bin/indent/io.c ============================================================================== --- head/usr.bin/indent/io.c Tue Aug 23 01:40:45 2016 (r304650) +++ head/usr.bin/indent/io.c Tue Aug 23 01:58:02 2016 (r304651) @@ -200,6 +200,7 @@ dump_line(void) break; case '\\': putc('\\', output); + /* add a backslash to escape the '\' */ default: putc(*follow, output); } Modified: head/usr.bin/indent/parse.c ============================================================================== --- head/usr.bin/indent/parse.c Tue Aug 23 01:40:45 2016 (r304650) +++ head/usr.bin/indent/parse.c Tue Aug 23 01:58:02 2016 (r304651) @@ -95,6 +95,7 @@ parse(int tk) /* tk: the code for the co case ifstmt: /* scanned if (...) */ if (ps.p_stack[ps.tos] == elsehead && ps.else_if) /* "else if ..." */ ps.i_l_follow = ps.il[ps.tos]; + /* the rest is the same as for dolit and forstmt */ case dolit: /* 'do' */ case forstmt: /* for (...) */ ps.p_stack[++ps.tos] = tk; @@ -301,7 +302,7 @@ reduce(void) case swstmt: /* */ case_ind = ps.cstk[ps.tos - 1]; - + /* FALLTHROUGH */ case decl: /* finish of a declaration */ case elsehead: /* < else> */