Linux: cache bypass: avoid unused variable warnings
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 1 Jul 2010 19:22:47 +0000 (15:22 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 2 Jul 2010 04:13:05 +0000 (21:13 -0700)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_bypasscache.c

index 9decac0..baa79e1 100644 (file)
@@ -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;