git: c57ce1ab8704 - stable/12 - opencrypto: mark INVARIANTS variables as __diagused

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 29 Aug 2022 13:07:08 UTC
The branch stable/12 has been updated by emaste:

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

commit c57ce1ab8704b567bb649d7edfa860e664192c84
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-08-09 23:23:19 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-08-29 13:06:03 +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
    
    (cherry picked from commit 3471fcf3a42d2a7b221215bfc772a6d1a170a059)
---
 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 d80894909130..94ee93ae5374 100644
--- a/sys/opencrypto/criov.c
+++ b/sys/opencrypto/criov.c
@@ -64,7 +64,7 @@ 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();
@@ -84,7 +84,7 @@ 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();
@@ -137,7 +137,7 @@ cuio_apply(struct uio *uio, int off, int len, int (*f)(void *, 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;