git: 7e9680d3be48 - main - cache: whack "set but not used" warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Nov 2021 16:58:22 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7e9680d3be484baac7fe78cef2be4e7ce4b4946f commit 7e9680d3be484baac7fe78cef2be4e7ce4b4946f Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-11-14 16:57:11 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-11-14 16:57:43 +0000 cache: whack "set but not used" warnings --- sys/kern/vfs_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 006f16587021..4c76244901bb 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4782,7 +4782,6 @@ cache_fplookup_emptypath(struct cache_fpl *fpl) struct componentname *cnp; enum vgetstate tvs; struct vnode *tvp; - seqc_t tvp_seqc; int error, lkflags; fpl->tvp = fpl->dvp; @@ -4791,7 +4790,6 @@ cache_fplookup_emptypath(struct cache_fpl *fpl) ndp = fpl->ndp; cnp = fpl->cnp; tvp = fpl->tvp; - tvp_seqc = fpl->tvp_seqc; MPASS(*cnp->cn_pnbuf == '\0'); @@ -5086,11 +5084,13 @@ cache_fplookup_dotdot(struct cache_fpl *fpl) static int __noinline cache_fplookup_neg(struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash) { - u_char nc_flag; + u_char nc_flag __diagused; bool neg_promote; +#ifdef INVARIANTS nc_flag = atomic_load_char(&ncp->nc_flag); MPASS((nc_flag & NCF_NEGATIVE) != 0); +#endif /* * If they want to create an entry we need to replace this one. */