From nobody Fri Nov 11 18:37:05 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N86r20X4Nz4dbfX; Fri, 11 Nov 2022 18:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N86r16qr8z3wqB; Fri, 11 Nov 2022 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJ8ogfS6Abj2agy4uXUf09Cx8DdpnHcMb5Kx6gMHbmA=; b=EGT6+16xGIw7O2ZS0rZx/Si0TmXHvZcI9JiE1g7OB/yFK/jNKpJhnN9ReCN6/2BreQXB2I GwnVB4M7RMtwcBaAdusFaktU2KCj3/dx7OFDLqrfTYAyZD6NXdb1IyyyrSNjF0RPYdfQy+ WQX4H/s2I1yvjIHPJkFJZODUyOea9ENOIleyv/1mg+xCDdeJQWMwgvfo+5/HMBBRSowsbw 7/Vk+oZK1BmNu21Uc+z6TwhIXwNmjAs6t22oAr42OwG2TRGjCIUa4L1P0K4OQ2RSomBs9y z7GIkPu0ylyTwH30FGnopYjvSjFAfBc8lNOHlAo+5zueLJaYvQDRL4x/XCTh2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJ8ogfS6Abj2agy4uXUf09Cx8DdpnHcMb5Kx6gMHbmA=; b=BzeqiFGWRTyWNY84diSB5j7lwHzWLbQf/HEJ8bx2KRVlKoz71XT4VNrBNvz+WcyxmDzWwa vh82HGFZUVLN2ZrusE79IuimBhLSvZq8b69j0bx2G26oqgH8iL4/2GnaxKeVac4/g7uObG Qj6BaKz20ZHbzP9JElsmTeNnOQaWrvlyGV2a11CWRFg95QZ09FmSR+GxC8z4gyNFL0ulOQ 5klQz7xqUJwRw8DTnT5afaORux/ZhBaXLELP3sTmyyccY7BbZyqUkB31eDJE9O8brrl4d6 av9uSzd8wfvLBL5WKcTAR68+ZQzGL/j170WXC4O7xljridzry4Gm+gehEmm+Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668191826; a=rsa-sha256; cv=none; b=JTfjS7DpVqTUt7Fao0CNfD/lQ8NglZLxtvJhZlG9TLYv9ddW4Opyjt3gxhl67EFvmwhYfh H6HiGdxP1fVx7Yj7G9EbYh5C1pM6LK30eJs8rXBg9Ezjo6GIrOS2YyZwhN13zBkn0pkts7 WTuN/rBzY3VxqQ9KlZ/hqjUc5YjMeiFBRxvGx0SIoweaFfarLSVtahl/cJVaLMAKVa6nFP n7jZD4pE0SoxrIEnhGVJkm+/IVU580880umo3DdfPccVuHudSjzKe8pvKlGVdfNcBojDhy I3ir0nI/Q+ahjjsYjwm2NcLuOsGDYKXbOHKV+we/lDvV30l4GLJJVNIpoCW9Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N86r15RCSztJp; Fri, 11 Nov 2022 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ABIb5ua004469; Fri, 11 Nov 2022 18:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABIb5XQ004468; Fri, 11 Nov 2022 18:37:05 GMT (envelope-from git) Date: Fri, 11 Nov 2022 18:37:05 GMT Message-Id: <202211111837.2ABIb5XQ004468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 068c9d3de7c9 - stable/13 - rs: Fix various harmless warnings. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 068c9d3de7c95903d7827d18327219d6be02db04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=068c9d3de7c95903d7827d18327219d6be02db04 commit 068c9d3de7c95903d7827d18327219d6be02db04 Author: John Baldwin AuthorDate: 2022-10-05 23:47:21 +0000 Commit: John Baldwin CommitDate: 2022-11-11 18:18:54 +0000 rs: Fix various harmless warnings. - Add /* FALLTHROUGH */ comments for intentional fall throughs in getargs(). - Remove id strings to quiet -Wunused-const-variable warnings from GCC. - While here, remove __FBSDID. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D36830 (cherry picked from commit bb31e1bbf2ade7abd38eb29391e1ba0718723480) --- usr.bin/rs/rs.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c index 94675fc96338..99e48194b3c7 100644 --- a/usr.bin/rs/rs.c +++ b/usr.bin/rs/rs.c @@ -29,25 +29,12 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char copyright[] = -"@(#) Copyright (c) 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static const char sccsid[] = "@(#)rs.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ - /* * rs - reshape a data array * Author: John Kunze, Office of Comp. Affairs, UCB * BEWARE: lots of unfinished edges */ -#include -__FBSDID("$FreeBSD$"); - #include #include #include @@ -402,11 +389,13 @@ getargs(int ac, char *av[]) switch (*p) { case 'T': flags |= MTRANSPOSE; + /* FALLTHROUGH */ case 't': flags |= TRANSPOSE; break; case 'c': /* input col. separator */ flags |= ONEISEPONLY; + /* FALLTHROUGH */ case 's': /* one or more allowed */ if (p[1]) isep = *++p; @@ -415,6 +404,7 @@ getargs(int ac, char *av[]) break; case 'C': flags |= ONEOSEPONLY; + /* FALLTHROUGH */ case 'S': if (p[1]) osep = *++p; @@ -428,6 +418,7 @@ getargs(int ac, char *av[]) break; case 'K': /* skip N lines */ flags |= SKIPPRINT; + /* FALLTHROUGH */ case 'k': /* skip, do not print */ p = getnum(&skip, p, 0); if (!skip) @@ -459,6 +450,7 @@ getargs(int ac, char *av[]) break; case 'H': /* print shape only */ flags |= DETAILSHAPE; + /* FALLTHROUGH */ case 'h': flags |= SHAPEONLY; break; @@ -485,14 +477,19 @@ getargs(int ac, char *av[]) /*if (!osep) osep = isep;*/ switch (ac) { - /*case 3: - opages = atoi(av[2]);*/ +#if 0 + case 3: + opages = atoi(av[2]); + /* FALLTHROUGH */ +#endif case 2: if ((ocols = atoi(av[1])) < 0) ocols = 0; + /* FALLTHROUGH */ case 1: if ((orows = atoi(av[0])) < 0) orows = 0; + /* FALLTHROUGH */ case 0: break; default: