Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Mar 2022 10:23:23 GMT
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1e9ce60a6d75 - main - cap_fileargs: silence warnings of unused variable
Message-ID:  <202203201023.22KANNvS035839@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by oshogbo:

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

commit 1e9ce60a6d758ddf5392e96e886fd815694dd66b
Author:     Mariusz Zaborski <oshogbo@FreeBSD.org>
AuthorDate: 2022-03-20 10:17:31 +0000
Commit:     Mariusz Zaborski <oshogbo@FreeBSD.org>
CommitDate: 2022-03-20 10:22:55 +0000

    cap_fileargs: silence warnings of unused variable
    
    We still want to fetch the variable just to verify that the interface
    is right.
    
    Reported by:    pstef
---
 lib/libcasper/services/cap_fileargs/cap_fileargs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/libcasper/services/cap_fileargs/cap_fileargs.c b/lib/libcasper/services/cap_fileargs/cap_fileargs.c
index 64ec69698165..a4b18a8ad6f2 100644
--- a/lib/libcasper/services/cap_fileargs/cap_fileargs.c
+++ b/lib/libcasper/services/cap_fileargs/cap_fileargs.c
@@ -275,8 +275,7 @@ fileargs_cinitnv(cap_channel_t *cas, nvlist_t *limits)
 {
 	cap_channel_t *chann;
 	fileargs_t *fa;
-	int serrno, ret;
-	int flags, operations;
+	int flags, ret, serrno;
 
 	assert(cas != NULL);
 
@@ -294,7 +293,7 @@ fileargs_cinitnv(cap_channel_t *cas, nvlist_t *limits)
 	}
 
 	flags = nvlist_get_number(limits, "flags");
-	operations = nvlist_get_number(limits, "operations");
+	(void)nvlist_get_number(limits, "operations");
 
 	/* Limits are consumed no need to free them. */
 	ret = cap_limit_set(chann, limits);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203201023.22KANNvS035839>