aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2021-12-05 22:23:47 +0000
committerScott Long <scottl@FreeBSD.org>2021-12-05 22:25:44 +0000
commit5a052b6114eae84a52519f75a4d504f544f86f98 (patch)
tree9b8fe8f26ed9e189bd61901431d6674bbcdce9ec /sys/opencrypto
parent14c912c60dbdeea1769eb32a511e8822356cc6ad (diff)
downloadsrc-5a052b6114eae84a52519f75a4d504f544f86f98.tar.gz
src-5a052b6114eae84a52519f75a4d504f544f86f98.zip
Fix "set but not used" in opencrypto
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/criov.c2
-rw-r--r--sys/opencrypto/cryptosoft.c4
-rw-r--r--sys/opencrypto/xform_chacha20_poly1305.c4
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,