Linux: cache bypass: warning fixes in afs_pioctl.c
authorMarc Dionne <marc.c.dionne@gmail.com>
Fri, 2 Jul 2010 12:55:44 +0000 (08:55 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 2 Jul 2010 16:14:52 +0000 (09:14 -0700)
Fix two minor warnings in afs_pioctl.c:

- gcc complains that threshold may get used uninitialized.  the
warning looks bogus, but initialize it to keep gcc happy.

- PSetCachingBlkSize is declared but never defined.

Change-Id: I3ac84d665f60ba51fef2d52f2bd8d90e0a7bc3b3
Reviewed-on: http://gerrit.openafs.org/2322
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_pioctl.c

index 54d2224..1c67e44 100644 (file)
@@ -297,7 +297,6 @@ DECL_PIOCTL(PPrecache);
 DECL_PIOCTL(PGetPAG);
 #if defined(AFS_CACHE_BYPASS)
 DECL_PIOCTL(PSetCachingThreshold);
-DECL_PIOCTL(PSetCachingBlkSize);
 #endif
 
 /*
@@ -5008,7 +5007,7 @@ DECL_PIOCTL(PSetCachingThreshold)
 {
     afs_int32 getting = 1;
     afs_int32 setting = 1;
-    afs_int32 threshold;
+    afs_int32 threshold = AFS_CACHE_BYPASS_DISABLED;
 
     if (afs_pd_getInt(ain, &threshold) != 0)
        setting = 0;