From nobody Thu Apr 25 13:20:57 2024 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 4VQGhB55kdz5Hj1W; Thu, 25 Apr 2024 13:20:58 +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 4VQGhB17vKz3xsD; Thu, 25 Apr 2024 13:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714051258; 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=EpuYknRT/8Ru1LLwJIh/upaLGPeaaBzJq0cH9XzQWyE=; b=LzFgCJAdOBJO8ByCQrO7qy7Fr4n3MZP8V0jYJWpJhj99iCiYuBvx41Nm5miy/qt+hwutbz HqeqFskaPQr7N0SsQeGtxQC5DxtynI+yaoyS4GCqqOo2KmlBE2QnPToNS5o1vj8dp5ySo8 3D2eKsXd1tUZAM+AXcPMZNhFI81X5i70z3sPP7m8kdohgb1yGrR6qNQAR7rL5Xq+OYXM/S RPjk0nTpKs7X/80ltRMEo46dhn46HHnzmDmcInRSReMk2XyT2YBpgTpcx8eUl+eBJfCiKa eK+s7Bim1YRxZHRA8dN/1K0UCWJ+ERX0b7iqSMa6WqPPEzDf8N1y1EbW06yeog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714051258; a=rsa-sha256; cv=none; b=LyU2cM9ZLpBYg2itdcQ5mlJs7sdfHgmDCV/JsNTrYZi2DOIpLR6UCyU+7gOfuXMD7fMQSe VXhttJS89Ip5fjmMEm8A5CWsa7ob5zrbWFdpjHwX9fNQdVh+utjXvpzOTPxJZbAfFgledU AlgVvLUjZO7CUKOcbLPMvtpI6lMWnfevhoAaFg8n9cDc5Wtoj6/WTUKbSbhUtleijqFTas d5b1sHsVdlp+DWas6ISz473K4qWMS+Q3K4MM6owxdjpVZg3lKz8IG43CLPypwb2pwXOC5t bDA4M/XgNICifihNK8VR3sJ0Pg/WXmYVB0UczimWYdviRtrQZ5rNoiTla65AwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714051258; 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=EpuYknRT/8Ru1LLwJIh/upaLGPeaaBzJq0cH9XzQWyE=; b=wyadnSGfbmrVmjiMomoHMq0N9n6hx+/buLWvDPfAR5WbrtrL2Nf8lBLCJAncpAe2G3OfVF HYz9fpdCwZyjxBsOERhGltqtqUS2vCTCihJNHx2qOjdeY/56zp4dpWkWBVMFZHUECfmGTL dO1DFm3g180YNL5ihoUU4KPl1Z76M51KefoQyt+4XqRzbXkHp0VSCtyGUBhtwfb7V22J7I rfsqpqeHkyBEJEKBdhX5uOcwURjZFPD0vYsmU+TPGOX9VE9QwaLQ8UCzlbWwnX9gZCiD90 mT9ym0J0GJCNXrQjZND99WX4CVDq22Xr2Zz/CJCFnt45gOJNFlOpa9FJW/agtA== 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 4VQGh96bNPz11VF; Thu, 25 Apr 2024 13:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PDKvPf001831; Thu, 25 Apr 2024 13:20:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PDKvPL001828; Thu, 25 Apr 2024 13:20:57 GMT (envelope-from git) Date: Thu, 25 Apr 2024 13:20:57 GMT Message-Id: <202404251320.43PDKvPL001828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a2eaf1cdd625 - stable/14 - dumpon: fix set but not used variable 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2eaf1cdd62576be5e29155e4f10eeb4593e2992 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2eaf1cdd62576be5e29155e4f10eeb4593e2992 commit a2eaf1cdd62576be5e29155e4f10eeb4593e2992 Author: inkeliz AuthorDate: 2024-04-17 21:22:44 +0000 Commit: Mark Johnston CommitDate: 2024-04-25 13:20:18 +0000 dumpon: fix set but not used variable Signed-off-by: inkeliz Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1178 (cherry picked from commit 464b1ab216d5f78054626524addf99f5c622da96) --- sbin/dumpon/dumpon.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index 81144e33bc71..eb890e250fbb 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -475,20 +475,23 @@ main(int argc, char *argv[]) struct diocskerneldump_arg ndconf, *kdap; struct addrinfo hints, *res; const char *dev, *pubkeyfile, *server, *client, *gateway; - int ch, error, fd, cipher; + int ch, error, fd; bool gzip, list, netdump, zstd, insert, rflag; uint8_t ins_idx; +#ifdef HAVE_CRYPTO + int cipher = KERNELDUMP_ENC_NONE; +#endif gzip = list = netdump = zstd = insert = rflag = false; kdap = NULL; pubkeyfile = NULL; server = client = gateway = NULL; ins_idx = KDA_APPEND; - cipher = KERNELDUMP_ENC_NONE; while ((ch = getopt(argc, argv, "C:c:g:i:k:lrs:vZz")) != -1) switch ((char)ch) { case 'C': +#ifdef HAVE_CRYPTO if (strcasecmp(optarg, "chacha") == 0 || strcasecmp(optarg, "chacha20") == 0) cipher = KERNELDUMP_ENC_CHACHA20; @@ -499,6 +502,11 @@ main(int argc, char *argv[]) errx(EX_USAGE, "Unrecognized cipher algorithm " "'%s'", optarg); break; +#else + errx(EX_USAGE, + "Built without crypto support, -C is unhandled."); + break; +#endif case 'c': client = optarg; break;