From: Marc Dionne Date: Sat, 11 Sep 2010 00:40:56 +0000 (-0400) Subject: viced, tviced: Set but not used variables X-Git-Tag: openafs-devel-1_5_78~110 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ce0a56e3ac918f3195252a07a72e3afe62b9ecd0;p=packages%2Fo%2Fopenafs.git viced, tviced: Set but not used variables Remove or ifdef out some variables that are set but never used. Spotted by gcc 4.6 Reviewed-on: http://gerrit.openafs.org/2853 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a2de10a1705a88ef652f4489383801a15c938a12) Change-Id: Ic9186fd94a00445097af96e67eaeac1cc4b16915 Reviewed-on: http://gerrit.openafs.org/2928 Tested-by: Derrick Brashear --- diff --git a/src/tviced/serialize_state.c b/src/tviced/serialize_state.c index 654f472e9..a27cbda78 100644 --- a/src/tviced/serialize_state.c +++ b/src/tviced/serialize_state.c @@ -936,9 +936,11 @@ fs_stateSeek(struct fs_dump_state * state, afs_uint64 * offset) { int ret = 0; char * p; +#ifndef AFS_64BIT_ENV afs_uint32 hi, lo; SplitInt64(*offset, hi, lo); +#endif /* update cursor */ p = (char *) state->mmap.map; diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 84656d81c..887ac573e 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -4979,7 +4979,6 @@ SAFSS_RemoveDir(struct rx_call *acall, struct AFSFid *DirFid, char *Name, Volume *volptr = 0; /* pointer to the volume header */ struct client *client = 0; /* pointer to client structure */ afs_int32 rights, anyrights; /* rights for this and any user */ - Vnode debugvnode1, debugvnode2; struct client *t_client; /* tmp ptr to client data */ struct in_addr logHostAddr; /* host ip holder for inet_ntoa */ struct rx_connection *tcon = rx_ConnectionOf(acall); @@ -5006,7 +5005,6 @@ SAFSS_RemoveDir(struct rx_call *acall, struct AFSFid *DirFid, char *Name, &rights, &anyrights))) { goto Bad_RemoveDir; } - debugvnode1 = *parentptr; /* set volume synchronization information */ SetVolumeSync(Sync, volptr); @@ -5016,7 +5014,6 @@ SAFSS_RemoveDir(struct rx_call *acall, struct AFSFid *DirFid, char *Name, goto Bad_RemoveDir; } - debugvnode2 = *parentptr; /* Do the actual delete of the desired (empty) directory, Name */ if ((errorCode = DeleteTarget(parentptr, volptr, &targetptr, &dir, &fileFid, Name, diff --git a/src/viced/callback.c b/src/viced/callback.c index 58e7764bc..5555391c7 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -1003,7 +1003,6 @@ int BreakDelayedCallBacks_r(struct host *host) { struct AFSFid fids[AFSCBMAX]; - u_byte thead[AFSCBMAX]; /* This should match thead in struct Callback */ int cbi, first, nfids; struct CallBack *cb; int code; @@ -1058,7 +1057,6 @@ BreakDelayedCallBacks_r(struct host *host) cbi = cb->hnext; if (cb->status == CB_DELAYED) { struct FileEntry *fe = itofe(cb->fhead); - thead[nfids] = cb->thead; fids[nfids].Volume = fe->volid; fids[nfids].Vnode = fe->vnode; fids[nfids].Unique = fe->unique; @@ -2462,9 +2460,6 @@ cb_stateRestoreCBs(struct fs_dump_state * state, struct FileEntry * fe, int ret = 0, idx; struct CallBack * cb; struct CBDiskEntry * cbdsk; - afs_uint32 fei; - - fei = fetoi(fe); for (idx = 0; idx < niovecs; idx++) { cbdsk = (struct CBDiskEntry *) iov[idx].iov_base; diff --git a/src/viced/fsprobe.c b/src/viced/fsprobe.c index 7d44b9fa0..186779191 100644 --- a/src/viced/fsprobe.c +++ b/src/viced/fsprobe.c @@ -63,7 +63,6 @@ main(int argc, char **argv) struct sockaddr_in host; afs_int32 code; struct hostent *hp; - char *hostname; char hnamebuf[200]; struct timeval tv; int noAuth = 1; /* Default is authenticated connections */ @@ -81,13 +80,11 @@ main(int argc, char **argv) #endif if (host.sin_addr.s_addr != -1) { strcpy(hnamebuf, av[0]); - hostname = hnamebuf; } else { hp = gethostbyname(av[0]); if (hp) { host.sin_family = hp->h_addrtype; memcpy((caddr_t) & host.sin_addr, hp->h_addr, hp->h_length); - hostname = hp->h_name; } else { printf("unknown server host %s\n", av[0]); exit(1); diff --git a/src/viced/host.c b/src/viced/host.c index 868d2729d..a390af964 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -689,7 +689,6 @@ h_Alloc_r(struct rx_connection *r_con) { struct servent *serverentry; struct host *host; - afs_int32 now; #if FS_STATS_DETAILED afs_uint32 newHostAddr_HBO; /*New host IP addr, in host byte order */ #endif /* FS_STATS_DETAILED */ @@ -717,7 +716,7 @@ h_Alloc_r(struct rx_connection *r_con) /* Make a callback channel even for the console, on the off chance that it * makes a request that causes a break call back. It shouldn't. */ h_SetupCallbackConn_r(host); - now = host->LastCall = host->cpsCall = host->ActiveCall = FT_ApproxTime(); + host->LastCall = host->cpsCall = host->ActiveCall = FT_ApproxTime(); host->hostFlags = 0; host->hcps.prlist_val = NULL; host->hcps.prlist_len = 0;