FBSD: avoid unused-variable warning
authorBen Kaduk <kaduk@mit.edu>
Mon, 21 Jul 2014 21:50:50 +0000 (17:50 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 13 Aug 2014 15:31:23 +0000 (11:31 -0400)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/afs/FBSD/osi_vcache.c

index 8f4df57..6d83702 100644 (file)
@@ -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();