cache: whack "set but not used" warnings

This commit is contained in:
Mateusz Guzik 2021-11-14 16:57:11 +00:00
parent 047c4e365d
commit 7e9680d3be

View File

@ -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.
*/