From nobody Sun Dec 05 22:26:28 2021 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 4B4BD18D1BBB; Sun, 5 Dec 2021 22:26:29 +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 4J6h4506vGz3pZv; Sun, 5 Dec 2021 22:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CE27E20137; Sun, 5 Dec 2021 22:26:28 +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 1B5MQSEh024952; Sun, 5 Dec 2021 22:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B5MQS8l024951; Sun, 5 Dec 2021 22:26:28 GMT (envelope-from git) Date: Sun, 5 Dec 2021 22:26:28 GMT Message-Id: <202112052226.1B5MQS8l024951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: 5a052b6114ea - main - Fix "set but not used" in opencrypto 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a052b6114eae84a52519f75a4d504f544f86f98 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638743189; 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=bjcchvuiygPe4ppAmdZjaeUqTF9mCjkhVKgRBVSTjco=; b=SqVnSvZgxMKGYLvlH4PMh3dixH9OoPU7NYIHsX2ftixu8EC74KQKacbHFfC1laPpeqGk3t OIGOB67nioLjYyJw1Zs+0ug8z02YPrsv4ghJV9dhbpFaRVUtxAtCttCQZ1roAs2nzafRDs 4fVcS/V1avf/GhmU3nK9XjD58mReVmkqBU3FiE6o9tnIC+t49ss/kyNIo0CzC1LHDCD0xK YWbjPIlfpmpp2/pKSvkUASIiDsDordXAjtma1ORIYyqA+u3QI5MrkhHWqFftG7vK96nqqg BoG1c4mBArQxBtxO52mM5pSLnQfq5z/Y+dZQQENa5RUDMJh5i4YDp2KYAx0T8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638743189; a=rsa-sha256; cv=none; b=Fg/Bp8xFwddKvFmzrJ44D7nkp6TB9HasAnpvhcpAuQwwkyXR+B7c6LRvvq3vYHb3TsETx3 feAM1UN5XhSYggKwDdhJgm6cu0J4k/g1aaUi+4oYsA5VU2eIm/GR+7mDs9nqyqLSs5zEHl 7qDNv1CKPgSqlONJHX4WM0Jwzl4+9TagX1pi7psW4XNWrCuwQVDS1FYffcUmUSGm04yhox CMEmfp61JR5SUC4MVbOSFHhO0SIXGXfa2PkIir3UvulGB46gzDU5VQF23B3p7lLZYvWJ2X 89tgLePhj5yraVDaYTQuNu96pT7v+2N/GhNfBIy6TC+xeLqWLHO3tivGt2SUqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=5a052b6114eae84a52519f75a4d504f544f86f98 commit 5a052b6114eae84a52519f75a4d504f544f86f98 Author: Scott Long AuthorDate: 2021-12-05 22:23:47 +0000 Commit: Scott Long CommitDate: 2021-12-05 22:25:44 +0000 Fix "set but not used" in opencrypto Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/opencrypto/criov.c | 2 -- sys/opencrypto/cryptosoft.c | 4 ---- sys/opencrypto/xform_chacha20_poly1305.c | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/opencrypto/criov.c b/sys/opencrypto/criov.c index 52f3d7988230..fe15a59676ae 100644 --- a/sys/opencrypto/criov.c +++ b/sys/opencrypto/criov.c @@ -158,7 +158,6 @@ static int cvm_page_apply(vm_page_t *pages, int off, int len, int (*f)(void *, const void *, u_int), void *arg) { - int processed = 0; unsigned count; int rval; @@ -170,7 +169,6 @@ cvm_page_apply(vm_page_t *pages, int off, int len, if (rval) return (rval); len -= count; - processed += count; off = 0; pages++; } diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index 94ba1a5af8f5..f8dfef5323d5 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -1550,8 +1550,6 @@ swcr_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) { struct swcr_session *ses; - struct swcr_encdec *swe; - struct swcr_auth *swa; const struct comp_algo *cxf; int error; @@ -1559,8 +1557,6 @@ swcr_newsession(device_t dev, crypto_session_t cses, mtx_init(&ses->swcr_lock, "swcr session lock", NULL, MTX_DEF); error = 0; - swe = &ses->swcr_encdec; - swa = &ses->swcr_auth; switch (csp->csp_mode) { case CSP_MODE_COMPRESS: switch (csp->csp_cipher_alg) { diff --git a/sys/opencrypto/xform_chacha20_poly1305.c b/sys/opencrypto/xform_chacha20_poly1305.c index a88a04b28dad..d2ddf6a410c9 100644 --- a/sys/opencrypto/xform_chacha20_poly1305.c +++ b/sys/opencrypto/xform_chacha20_poly1305.c @@ -68,7 +68,7 @@ static void chacha20_poly1305_crypt(void *vctx, const uint8_t *in, uint8_t *out) { struct chacha20_poly1305_cipher_ctx *ctx = vctx; - int error; + int error __diagused; if (ctx->ietf) error = crypto_stream_chacha20_ietf_xor_ic(out, in, @@ -86,7 +86,7 @@ chacha20_poly1305_crypt_last(void *vctx, const uint8_t *in, uint8_t *out, { struct chacha20_poly1305_cipher_ctx *ctx = vctx; - int error; + int error __diagused; if (ctx->ietf) error = crypto_stream_chacha20_ietf_xor_ic(out, in, len,