From 202ca802c30bfa6779fae0bd686da0ca96fc224d Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Thu, 1 Jul 2010 15:22:47 -0400 Subject: [PATCH 1/1] Linux: cache bypass: avoid unused variable warnings Some variables are only used for AFS_64BIT_CLIENT code, so make their declaration conditional as well. Also, initialize 'code' while we're at it. The compiler has a legitimate complaint that it could be used before it's set, for instance if we have AFS_64BIT_CLIENT but afs_serverHasNo64Bit is true. Change-Id: Ic04b07fffa9668123a9029bb42415a7c701c2339 Reviewed-on: http://gerrit.openafs.org/2317 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs_bypasscache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index 9decac0..baa79e1 100644 --- a/src/afs/afs_bypasscache.c +++ b/src/afs/afs_bypasscache.c @@ -547,7 +547,10 @@ afs_PrefetchNoCache(register struct vcache *avc, uio_t *auio; struct iovec *iovecp; struct vrequest *areq; - afs_int32 code, length_hi, bytes, locked; + afs_int32 code = 0; +#ifdef AFS_64BIT_CLIENT + afs_int32 length_hi, bytes, locked; +#endif register struct afs_conn *tc; afs_int32 i; -- 1.9.4