git: 6aa98b826f24 - stable/13 - opencrypto: mark INVARIANTS variables as __diagused

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

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

commit 6aa98b826f24ee019e3754400da1f6d9b9865463
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-08-09 23:23:19 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-08-29 01:03:48 +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 25702e3592fe..e54d31388133 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();
@@ -651,7 +651,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;