Remove pointless assignments 86/13086/3
authorPat Riehecky <riehecky@fnal.gov>
Fri, 25 May 2018 17:03:35 +0000 (12:03 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 26 May 2018 01:47:40 +0000 (21:47 -0400)
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 <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/afs/LINUX/osi_sleep.c
src/rx/rx_rdwr.c
src/uss/uss_fs.c
src/viced/callback.c
src/volser/vsprocs.c

index 07bb7fe..cdf2211 100644 (file)
@@ -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);
index 1d1257c..9deff75 100644 (file)
@@ -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;
index 06937d5..11cda30 100644 (file)
@@ -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);
index 0b3fc35..f685398 100644 (file)
@@ -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)
index b879ebc..b8bc0a8 100644 (file)
@@ -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 */