git: 3471fcf3a42d - main - opencrypto: mark INVARIANTS variables as __diagused

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Wed, 10 Aug 2022 19:37:19 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=3471fcf3a42d2a7b221215bfc772a6d1a170a059

commit 3471fcf3a42d2a7b221215bfc772a6d1a170a059
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-08-09 23:23:19 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-08-10 19:35:29 +0000

    opencrypto: mark INVARIANTS variables as __diagused
    
    Fixes INVARIANTS build with Clang 15, which previously failed due to
    set-but-not-used variable warnings.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/opencrypto/criov.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/opencrypto/criov.c b/sys/opencrypto/criov.c
index 02b040d787ff..5312fe622c5e 100644
--- a/sys/opencrypto/criov.c
+++ b/sys/opencrypto/criov.c
@@ -85,7 +85,7 @@ static void
 cuio_copydata(struct uio* uio, int off, int len, caddr_t cp)
 {
 	struct iovec *iov = uio->uio_iov;
-	int iol = uio->uio_iovcnt;
+	int iol __diagused = uio->uio_iovcnt;
 	unsigned count;
 
 	CUIO_SKIP();
@@ -105,7 +105,7 @@ static void
 cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp)
 {
 	struct iovec *iov = uio->uio_iov;
-	int iol = uio->uio_iovcnt;
+	int iol __diagused = uio->uio_iovcnt;
 	unsigned count;
 
 	CUIO_SKIP();
@@ -635,7 +635,7 @@ cuio_apply(struct uio *uio, int off, int len,
     int (*f)(void *, const void *, u_int), void *arg)
 {
 	struct iovec *iov = uio->uio_iov;
-	int iol = uio->uio_iovcnt;
+	int iol __diagused = uio->uio_iovcnt;
 	unsigned count;
 	int rval;