From: Pat Riehecky Date: Fri, 25 May 2018 17:03:35 +0000 (-0500) Subject: Remove pointless assignments X-Git-Tag: upstream/1.8.1_pre2^2~25 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7a191a7864f950a1b50703c3c9bbc2dcecf82669;p=packages%2Fo%2Fopenafs.git Remove pointless assignments scan-build identified these var assignements as being unused or redundant. Reviewed-on: https://gerrit.openafs.org/13086 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit e71985bce593e9dba43443e084eb726fcc5259e3) Change-Id: Ic93c5e775f13a8f75ba619391d71cb78f4dc06ae Reviewed-on: https://gerrit.openafs.org/13150 Tested-by: BuildBot Reviewed-by: PatRiehecky Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index 07bb7fed1..cdf22115f 100644 --- a/src/afs/LINUX/osi_sleep.c +++ b/src/afs/LINUX/osi_sleep.c @@ -140,7 +140,7 @@ int afs_osi_SleepSig(void *event) { struct afs_event *evp; - int seq, retval; + int seq; int code; evp = afs_getevent(event); @@ -150,7 +150,6 @@ afs_osi_SleepSig(void *event) } seq = evp->seq; - retval = 0; AFS_GUNLOCK(); code = wait_event_freezable(evp->cond, seq != evp->seq); diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 1d1257c91..9deff7592 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -1017,7 +1017,7 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) #ifdef RX_TRACK_PACKETS struct opr_queue *cursor; #endif - int nextio; + int nextio = 0; int requestCount; struct opr_queue tmpq; #ifdef RXDEBUG_PACKET @@ -1025,7 +1025,6 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) #endif requestCount = nbytes; - nextio = 0; MUTEX_ENTER(&call->lock); if (call->error) { @@ -1062,7 +1061,6 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) * to send. Set RX_PROTOCOL_ERROR if any problems are found in * the iovec. We put the loop condition at the end to ensure that * a zero length write will push a short packet. */ - nextio = 0; opr_queue_Init(&tmpq); #ifdef RXDEBUG_PACKET tmpqc = 0; diff --git a/src/uss/uss_fs.c b/src/uss/uss_fs.c index 06937d5c1..11cda30db 100644 --- a/src/uss/uss_fs.c +++ b/src/uss/uss_fs.c @@ -579,7 +579,7 @@ uss_fs_UnlogToken(char *celln) code); exit(1); } - for (code = index = 0; index < count; index++) { + for (index = 0; index < count; index++) { tp = tokenInfoP + index; if (!(tp->deleted)) { code = ktc_SetToken(&tp->service, &tp->token, &tp->client, 0); diff --git a/src/viced/callback.c b/src/viced/callback.c index 0b3fc35b2..f685398fb 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -1121,7 +1121,6 @@ BreakDelayedCallBacks_r(struct host *host) } host->z.hostFlags |= VENUSDOWN; /* Failed */ ClearHostCallbacks_r(host, 1 /* locked */ ); - nfids = 0; break; } if (nfids < AFSCBMAX) diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index b879ebc9e..b8bc0a84a 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -5512,7 +5512,6 @@ UV_ListVolumes(afs_uint32 aserver, afs_int32 apart, int all, afs_int32 code = 0; volEntries volumeInfo; - code = 0; *size = 0; *resultPtr = (volintInfo *) 0; volumeInfo.volEntries_val = (volintInfo *) 0; /*this hints the stub to allocate space */