From 19599b5ef5f7dff2741e13974692fe4a84721b59 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Sat, 7 Jan 2017 06:22:47 -0500 Subject: [PATCH] LINUX: eliminate unused variable warning Commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286 added routine osi_TryEvictDentries and included new logic for D_INVALIDATE_IS_VOID. Unfortunately, this new code path no longer uses dentry; it also should have been made conditional at that time. Wrap the declaration of dentry in #ifndef D_INVALIDATE_IS_VOID to eliminate the unused variable warning. Change-Id: I89c1430ba984539ca775da2540ea966030de0701 Reviewed-on: https://gerrit.openafs.org/12505 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/afs/LINUX/osi_vcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/LINUX/osi_vcache.c b/src/afs/LINUX/osi_vcache.c index 23040b12c..52830c555 100644 --- a/src/afs/LINUX/osi_vcache.c +++ b/src/afs/LINUX/osi_vcache.c @@ -18,7 +18,9 @@ static void TryEvictDentries(struct vcache *avc) { +#ifndef D_INVALIDATE_IS_VOID struct dentry *dentry; +#endif struct inode *inode = AFSTOV(avc); #if defined(D_ALIAS_IS_HLIST) && !defined(HLIST_ITERATOR_NO_NODE) struct hlist_node *p; -- 2.39.5