From 9d547f2485791b10dbf3676e997353ca9abefde1 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 16 Apr 2011 16:38:45 -0400 Subject: [PATCH] src/afs: Set but unused variables warning fixes 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 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot --- src/afs/afs_bypasscache.c | 2 -- src/afs/afs_cell.c | 3 +-- src/afs/afs_init.c | 8 -------- src/afs/afs_pioctl.c | 3 +-- src/afs/afs_server.c | 3 --- src/afs/afs_vcache.c | 2 -- 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index 4aab3bbe1..6aafcabd4 100644 --- a/src/afs/afs_bypasscache.c +++ b/src/afs/afs_bypasscache.c @@ -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)) { diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 03ed2c3ed..29cb689fd 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -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); } diff --git a/src/afs/afs_init.c b/src/afs/afs_init.c index a1a856288..3154474c0 100644 --- a/src/afs/afs_init.c +++ b/src/afs/afs_init.c @@ -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 */ @@ -738,9 +733,6 @@ shutdown_vnodeops(void) #endif #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(); } diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index a8d81698e..e40f28167 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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; diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c index 39925f9c3..0b6553bfa 100644 --- a/src/afs/afs_server.c +++ b/src/afs/afs_server.c @@ -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]); diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index dc6a79980..55128d80b 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -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 = -- 2.39.5