]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced, tviced: Set but not used variables
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 11 Sep 2010 00:40:56 +0000 (20:40 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Oct 2010 19:18:38 +0000 (12:18 -0700)
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 <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a2de10a1705a88ef652f4489383801a15c938a12)
Change-Id: Ic9186fd94a00445097af96e67eaeac1cc4b16915
Reviewed-on: http://gerrit.openafs.org/2928
Tested-by: Derrick Brashear <shadow@dementia.org>
src/tviced/serialize_state.c
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/fsprobe.c
src/viced/host.c

index 654f472e936e8d85fadcd9a011c824fc301e7473..a27cbda780048db7dbb99741038802082ced9af1 100644 (file)
@@ -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;
index 84656d81c1aa6b1745dc62f693587c87814002c2..887ac573e3c75a7f66d54aed8b0ca675e1661e50 100644 (file)
@@ -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,
index 58e7764bc9dc33c08cf178488e1daea3af537e02..5555391c7ef8f2af41845e7178dce88a3814174e 100644 (file)
@@ -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;
index 7d44b9fa0bcf602f6800e590ff7ea41b2bb05b6d..1867791914ca1006ca54f7833f417462586221ce 100644 (file)
@@ -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);
index 868d2729d7b3918767261e1dc5af9c8698e4b74a..a390af9640e983dc251a2ab6407bc4a16e119efe 100644 (file)
@@ -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;