From nobody Wed Oct 05 23:48:31 2022 X-Original-To: dev-commits-src-main@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 4MjWVR4nf7z4TyCZ; Wed, 5 Oct 2022 23:48:31 +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 4MjWVR46vXz3RNJ; Wed, 5 Oct 2022 23:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665013711; 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=/15sg2OcsVcRzMZQl1n5RLvu9E4ks8x5Qf4vGZ53UT8=; b=ScOANInJVuv7MrqBmEa697dBIsFREXddOIJ5wy80gCU+qAot1yti7ZFlUyH1ZAjP9YJJCq 9+ZKXlAX2iT2z730HoBeiOjXTBVhzTjFSrquGjPqKXWGnd5eFK11sr1lmhdBF9y86vAhOU 658Pwa/CZZIRMk/t0nu0rethUsfwQWtoQajlSJkxKht6Ba5l7S9tPiU8B+tMCw2Th1SZc5 RjwyP21M1O8ZOEJRFll6ZhiY8iflS1AjhmShKjbJ+6LDNPqWyPcbGW6BO4agV6FypwIWI5 w9rDfALy01xa/9TihHa5ucO6hnPN+de9XGASFWVLYoPVCuTctKIkNOcx10O3nA== 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 4MjWVR2dCtz14BZ; Wed, 5 Oct 2022 23:48:31 +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 295NmV6H087259; Wed, 5 Oct 2022 23:48:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 295NmVWJ087258; Wed, 5 Oct 2022 23:48:31 GMT (envelope-from git) Date: Wed, 5 Oct 2022 23:48:31 GMT Message-Id: <202210052348.295NmVWJ087258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bb31e1bbf2ad - main - rs: Fix various harmless warnings. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: bb31e1bbf2ade7abd38eb29391e1ba0718723480 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665013711; 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=/15sg2OcsVcRzMZQl1n5RLvu9E4ks8x5Qf4vGZ53UT8=; b=aEcexY3V7dC8UKHfwWIEmuyChRg3e50l3oaGEtgnwrbBgPG4O0MT2RyZt4aDnF8iVDSeBW QEqQQsR3S9rb8SQz0WHttiro/yRd8PoKJ4dbqYaDwhA3YJPH5n+9PdnRhFCHnBuzjEOTGh fLe13WAXl0706DOYx67+ViGaiZbfMgRHRVF1pWFWfFShxGGOkJvpgt7PpOnXmw2kf84idj A6Dga4/rIs5/ojonRZIeCHSGMXk5zEjPqV7Fo/zn9cW6nprbDhhJ/X6WKzqBgz9Xrr0q3W RT6o408CTKmdkxEz6aLwhMh67UYUuNTaPBeOSApxixqxcqrobBBUVgSU49BehQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665013711; a=rsa-sha256; cv=none; b=yttbNeTpgqE8DMl2538HsSjYm9y+HNHxBm2FyR58m8lPRxE9mYbAAMQQV9E6f3o3g3uTSk u35ZlteDyh5c0ZOBa4P2RXhad2go+gkdMcFdW0B7iZytDT8K7bJOb++RxDyKEZ3Ofa/NUh tBgn6GrN3XXfuz50wSRKFCasUgow3CVwAn/ucBfEeYJngM/TrOTwBr7kwlY9sfuXx654wu Io6EKZ6SvTd+Pb+jK4hOI6hvm6y8Ycvw7tzlutunkWVijdmJLcj78DakcQgzvQLS7PnVnd 8E8RJlZYhVHo/Rs7UyFV+Lg/N+ywDyhFFRbKOi7WRkUGlWRzDVaKWd9gfPFLqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bb31e1bbf2ade7abd38eb29391e1ba0718723480 commit bb31e1bbf2ade7abd38eb29391e1ba0718723480 Author: John Baldwin AuthorDate: 2022-10-05 23:47:21 +0000 Commit: John Baldwin CommitDate: 2022-10-05 23:47:21 +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 --- 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: