From f81f17938cf9ec2dfa3541983c125afc37817698 Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Mon, 21 Jul 2014 17:50:50 -0400 Subject: [PATCH] FBSD: avoid unused-variable warning This variable is passed as an argument to the ma_vn_lock() compat macro, which ignores the thread argument on some versions of FreeBSD. Make the variable only be declared in those cases when it will be used. Change-Id: I1ed10654fb402f4feec55d6d7c7ece6f0c78bc8e Reviewed-on: http://gerrit.openafs.org/11373 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman --- src/afs/FBSD/osi_vcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/FBSD/osi_vcache.c b/src/afs/FBSD/osi_vcache.c index 8f4df5767..6d837028e 100644 --- a/src/afs/FBSD/osi_vcache.c +++ b/src/afs/FBSD/osi_vcache.c @@ -77,7 +77,9 @@ osi_PrePopulateVCache(struct vcache *avc) { void osi_AttachVnode(struct vcache *avc, int seq) { struct vnode *vp; +#if !defined(AFS_FBSD80_ENV) struct thread *p = curthread; +#endif ReleaseWriteLock(&afs_xvcache); AFS_GUNLOCK(); -- 2.39.5