From: Marc Dionne Date: Thu, 1 Jul 2010 19:22:47 +0000 (-0400) Subject: Linux: cache bypass: avoid unused variable warnings X-Git-Tag: openafs-devel-1_5_75~24 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=202ca802c30bfa6779fae0bd686da0ca96fc224d;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index 9decac003..baa79e125 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;