]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Mark nearInode as unused
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 13 Jul 2011 13:31:15 +0000 (14:31 +0100)
committerDerrick Brashear <shadow@dementia.org>
Wed, 13 Jul 2011 22:18:23 +0000 (15:18 -0700)
When we're building an inode fileserver, we use the nearInode hint.
The IH_CREATE macro just throws this hint away if we're building namei,
which leads to compiler warnings about set-but-unused variables. Just
flag nearInode as being potentially unused in order to suppress these
warnings.

Change-Id: I25022dc859974e9311e4530a9eeee8ab1d77c373
Reviewed-on: http://gerrit.openafs.org/4999
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/viced/afsfileprocs.c
src/vol/vutil.c
src/volser/dumpstuff.c
src/volser/vol_split.c

index 18fe4f249ac9da9f20a07194a7e040e60abce3db..d09ef968cf7ed03be4790537810ee00bcf3ebf8a 100644 (file)
@@ -1175,7 +1175,8 @@ RXStore_AccessList(Vnode * targetptr, struct AFSOpaque *AccessList)
 static int
 CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len)
 {
-    Inode ino, nearInode;
+    Inode ino;
+    Inode nearInode AFS_UNUSED;
     ssize_t rdlen;
     ssize_t wrlen;
     afs_fsize_t size;
@@ -1794,7 +1795,7 @@ Alloc_NewVnode(Vnode * parentptr, DirHandle * dir, Volume * volptr,
     Error errorCode = 0;               /* Error code returned back */
     Error temp;
     Inode inode = 0;
-    Inode nearInode;           /* hint for inode allocation in solaris */
+    Inode nearInode AFS_UNUSED;         /* hint for inode allocation in solaris */
     afs_ino_str_t stmp;
 
     if ((errorCode =
index 396832d51bf3e0d1b7f2430afc6ea08031984125..1e0edc641b4fa00c8870867434f276886aa52c70 100644 (file)
@@ -109,7 +109,7 @@ VCreateVolume_r(Error * ec, char *partname, VolId volumeId, VolId parentId)
     struct VolumeDiskHeader diskHeader;
     IHandle_t *handle;
     FdHandle_t *fdP;
-    Inode nearInode = 0;
+    Inode nearInode AFS_UNUSED = 0;
     char *part, *name;
     struct stat st;
     struct VolumeHeader tempHeader;
index 1d48936c0139e6d7b8ae4e1fb0975fbc1acc45e8..702363be32fab1181e2fb640f0257919ffb4d508 100644 (file)
@@ -1303,7 +1303,7 @@ ReadVnodes(struct iod *iodp, Volume * vp, int incremental,
     struct VnodeClassInfo *vcp;
     IHandle_t *tmpH;
     FdHandle_t *fdP;
-    Inode nearInode;
+    Inode nearInode AFS_UNUSED;
     afs_int32 critical = 0;
 
     tag = iod_getc(iodp);
index f862f8927ee912ed4e68c2a95ede3fe0683859f2..e8377cb8a2afaa8a705e1d30e2ad05a762fc74f5 100644 (file)
@@ -377,7 +377,7 @@ afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol,
                ino = VNDISK_GET_INO(vnode);
                if (ino) {
                    IHandle_t *h, *newh;
-                   Inode nearInode;
+                   Inode AFS_UNUSED nearInode;
 #if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
                    V_pref(vol,nearInode)
 #endif