From e71985bce593e9dba43443e084eb726fcc5259e3 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Fri, 25 May 2018 12:03:35 -0500 Subject: [PATCH] Remove pointless assignments scan-build identified these var assignements as being unused or redundant. Change-Id: I3b51e3e1503c0724a2cf1bab37e1c02f4ae533b2 Reviewed-on: https://gerrit.openafs.org/13086 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/afs/LINUX/osi_sleep.c | 3 +-- src/rx/rx_rdwr.c | 4 +--- src/uss/uss_fs.c | 2 +- src/viced/callback.c | 1 - src/volser/vsprocs.c | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index 07bb7fe..cdf2211 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 1d1257c..9deff75 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 06937d5..11cda30 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 0b3fc35..f685398 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 b879ebc..b8bc0a8 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 */ -- 1.9.4