src/afs: Set but unused variables warning fixes
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 16 Apr 2011 20:38:45 +0000 (16:38 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 27 Apr 2011 11:56:19 +0000 (04:56 -0700)
Fix a few simple cases of set but unused variables under src/afs.

Change-Id: I78964b7128590d5db1f2c01dd7157c23966c26a0
Reviewed-on: http://gerrit.openafs.org/4491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/afs/afs_bypasscache.c
src/afs/afs_cell.c
src/afs/afs_init.c
src/afs/afs_pioctl.c
src/afs/afs_server.c
src/afs/afs_vcache.c

index 4aab3bb..6aafcab 100644 (file)
@@ -518,7 +518,6 @@ afs_PrefetchNoCache(struct vcache *avc,
 #endif
 
     struct afs_conn *tc;
-    afs_int32 i;
     struct rx_call *tcall;
     struct tlocal1 {
        struct AFSVolSync tsync;
@@ -536,7 +535,6 @@ afs_PrefetchNoCache(struct vcache *avc,
        tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK /* ignored */);
        if (tc) {
            avc->callback = tc->parent->srvr->server;
-           i = osi_Time();
            tcall = rx_NewCall(tc->id);
 #ifdef AFS_64BIT_CLIENT
            if (!afs_serverHasNo64Bit(tc)) {
index 03ed2c3..29cb689 100644 (file)
@@ -327,7 +327,6 @@ afs_cellname_init(afs_dcache_id_t *inode, int lookupcode)
 
     while (1) {
        afs_int32 cellnum, clen, magic;
-       struct cell_name *cn;
        char *cellname;
 
        cc = afs_osi_Read(tfile, off, &magic, sizeof(magic));
@@ -365,7 +364,7 @@ afs_cellname_init(afs_dcache_id_t *inode, int lookupcode)
            break;
        }
 
-       cn = afs_cellname_new(cellname, cellnum);
+       afs_cellname_new(cellname, cellnum);
        afs_osi_Free(cellname, clen + 1);
     }
 
index a1a8562..3154474 100644 (file)
@@ -726,11 +726,6 @@ shutdown_cache(void)
 void
 shutdown_vnodeops(void)
 {
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
-    struct buf *afs_bread_freebp = 0;
-#endif
-
-
     AFS_STATCNT(shutdown_vnodeops);
     if (afs_cold_shutdown) {
 #ifndef        AFS_SUN5_ENV            /* XXX */
@@ -739,9 +734,6 @@ shutdown_vnodeops(void)
 #ifndef AFS_LINUX20_ENV
        afs_rd_stash_i = 0;
 #endif
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
-       afs_bread_freebp = 0;
-#endif
        shutdown_mariner();
     }
 }
index a8d8169..e40f281 100644 (file)
@@ -730,7 +730,7 @@ afs_xioctl(struct inode *ip, struct file *fp, unsigned int com,
 {
     struct afs_ioctl_sys ua, *uap = &ua;
     struct vcache *tvc;
-    int ioctlDone = 0, code = 0;
+    int code = 0;
 
     AFS_STATCNT(afs_xioctl);
     ua.com = com;
@@ -752,7 +752,6 @@ afs_xioctl(struct inode *ip, struct file *fp, unsigned int com,
            code = HandleIoctl(tvc, uap->com, datap);
            osi_FreeSmallSpace(datap);
            AFS_GUNLOCK();
-           ioctlDone = 1;
        }
        else
            code = EINVAL;
index 39925f9..0b6553b 100644 (file)
@@ -1827,7 +1827,6 @@ afs_GetServer(afs_uint32 * aserverp, afs_int32 nservers, afs_int32 acell,
 {
     struct server *oldts = 0, *ts, *newts, *orphts = 0;
     struct srvAddr *oldsa, *newsa, *nextsa, *orphsa;
-    u_short fsport;
     afs_int32 iphash, k, srvcount = 0;
     unsigned int srvhash;
 
@@ -1896,8 +1895,6 @@ afs_GetServer(afs_uint32 * aserverp, afs_int32 nservers, afs_int32 acell,
     if (acell)
        newts->cell = afs_GetCell(acell, 0);
 
-    fsport = (newts->cell ? newts->cell->fsport : AFS_FSPORT);
-
     /* For each IP address we are registering */
     for (k = 0; k < nservers; k++) {
        iphash = SHash(aserverp[k]);
index dc6a799..55128d8 100644 (file)
@@ -1519,7 +1519,6 @@ afs_RemoteLookup(struct VenusFid *afid, struct vrequest *areq,
                 struct AFSVolSync *tsyncp)
 {
     afs_int32 code;
-    afs_uint32 start;
     struct afs_conn *tc;
     struct AFSFetchStatus OutDirStatus;
     XSTATS_DECLS;
@@ -1530,7 +1529,6 @@ afs_RemoteLookup(struct VenusFid *afid, struct vrequest *areq,
        if (tc) {
            if (serverp)
                *serverp = tc->parent->srvr->server;
-           start = osi_Time();
            XSTATS_START_TIME(AFS_STATS_FS_RPCIDX_XLOOKUP);
            RX_AFS_GUNLOCK();
            code =