From nobody Mon May 01 21:04:22 2023 X-Original-To: dev-commits-src-all@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 4Q9G125gl0z491B9; Mon, 1 May 2023 21:04:22 +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 4Q9G124SNhz3JJS; Mon, 1 May 2023 21:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; 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=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=Icat5eaHx2LwFYmYWka7rAyECEuOopVji2t9AFYgCsCKtUVTNP2U3qEjVzvAjeEAXPuHSn JZVwZ8B2C3D0bnwV4ojI4GYbPv687vRbI1BivbQB6EaKjK2zRxMnrkZId28SZaBtIL+sWO P4+tr2pRcG4g2dFpMcpPgeKGqntpWfkorcgt5bMX6um/TstK7xg7ZaL9kKLSUuh1WY1/KE QFzvFVUS2UQ9JF1ZTUmXVC1f/3cVUUZjKGRewiw7S0CHfCnLkEIgk/nXXCiKm9Wma6RlKk XN4FznAEgv5fqlGbWpHij5hwYy+tV0OMzl5EzaPZ4ta5Sx+Ox1VhGhaI4Yd4rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; 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=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=BK2MHR8Ry2vZm760eUdWSiwSgdNin3eFtz11fIFOMo4L0xAv/g94REQYc9sj9W2EwUbAn6 iP2ZPed+TOzPDBruIPUun1G2MN27vc29T0Fil5P5RSUl7aCnIpkxDkfkEu/bv+SHLtM+Fr IcdT+UFg4ovJDBuOPaHTLIB1bliUKj1hyyy+/eNZBk9VOoXUHQ1OhGMIg/UcEPjbGuqoRU HMIlcSyKBSyNmaszo4Lq+tiVWBUnSoYSlW0pd6fEYCQUGxzTEggrSY7kzK+01oAps+mXNd m4c5UNtVOsPc3K39IjoB+vEyXiHOjW8mwXg6UNw1r7xeZlYZ9pJ+Xydt0nxd+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975062; a=rsa-sha256; cv=none; b=a7KR4I7kQBU87zqpHSJ0IWfx38jY6QKdenE/ClAMXXV8U7VCkq9IIYSGt57Hdvh+yu8+/o O5xSz7YAhgoVV06hncUbccqQcPHBfNohfnNY2cB3C84U4L17SQMqNaDOEZ6gx3mdy0WKpN 21qW0GPlTmVHV34zCfa2I0STxa9hd/uAOPPaJyKoGMf1Uks2TqVGYHouSK6ZlwUDoswifv FqyLWtOpJH8rvGhU8J5ad0HVEl6UKNMvGISzyJKPg4JifNtw8qwWmidI3bsSOxBlV60UBr bQfWTKsxMocifyvRqxtbD9Ajm79FNWdYbAVBEPfo/fjvWcWSyxz5JOV/Twr1Ng== 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 4Q9G123FmxzLZl; Mon, 1 May 2023 21:04:22 +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 341L4Mkv051947; Mon, 1 May 2023 21:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Man051946; Mon, 1 May 2023 21:04:22 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:22 GMT Message-Id: <202305012104.341L4Man051946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cb8179079ab0 - main - stand: Fix warning about variable unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb8179079ab08263b0e3835655a83a8915f33eb4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb8179079ab08263b0e3835655a83a8915f33eb4 commit cb8179079ab08263b0e3835655a83a8915f33eb4 Author: Warner Losh AuthorDate: 2023-05-01 15:35:16 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: Fix warning about variable unused dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the ifdef. Sponsored by: Netflix --- stand/common/module.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index 43c04728b4fa..9902309b7f99 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -114,10 +114,14 @@ command_load(int argc, char *argv[]) char *typestr; #ifdef LOADER_VERIEXEC char *prefix, *skip; + int dflag = 0; + char *args = "dkp:s:t:"; +#else + char *args = "kt:"; #endif - int dflag, dofile, dokld, ch, error; + int dofile, dokld, ch, error; - dflag = dokld = dofile = 0; + dokld = dofile = 0; optind = 1; optreset = 1; typestr = NULL; @@ -129,11 +133,13 @@ command_load(int argc, char *argv[]) prefix = NULL; skip = NULL; #endif - while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) { + while ((ch = getopt(argc, argv, args)) != -1) { switch(ch) { +#ifdef LOADER_VERIEXEC case 'd': dflag++; break; +#endif case 'k': dokld = 1; break;