From: Ben Kaduk Date: Mon, 21 Jul 2014 21:50:50 +0000 (-0400) Subject: FBSD: avoid unused-variable warning X-Git-Tag: upstream/1.8.0_pre1^2~614 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f81f17938cf9ec2dfa3541983c125afc37817698;p=packages%2Fo%2Fopenafs.git 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 --- 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();