ubik: Set but not used variables
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 11 Sep 2010 17:06:26 +0000 (13:06 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 29 Oct 2010 16:04:25 +0000 (09:04 -0700)
Fix warnings, remove unused variables and code.

Spotted by gcc 4.6

Change-Id: I0a055c5f0fec34993c81f2dcf8f976cba5a31c8b
Reviewed-on: http://gerrit.openafs.org/3185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/ubik/recovery.c
src/ubik/remote.c

index e23d31c..6d4144a 100644 (file)
@@ -447,7 +447,7 @@ urecovery_Interact(void *dummy)
     struct ubik_server *bestServer = NULL;
     struct ubik_server *ts;
     int dbok, doingRPC, now;
-    afs_int32 lastProbeTime, lastDBVCheck;
+    afs_int32 lastProbeTime;
     /* if we're the sync site, the best db version we've found yet */
     static struct ubik_version bestDBVersion;
     struct ubik_version tversion;
@@ -460,14 +460,13 @@ urecovery_Interact(void *dummy)
     char hoststr[16];
 #ifndef OLD_URECOVERY
     char pbuffer[1028];
-    int flen, fd = -1;
+    int fd = -1;
     afs_int32 pass;
 #endif
 
     /* otherwise, begin interaction */
     urecovery_state = 0;
     lastProbeTime = 0;
-    lastDBVCheck = 0;
     while (1) {
        /* Run through this loop every 4 seconds */
        tv.tv_sec = 4;
@@ -556,7 +555,6 @@ urecovery_Interact(void *dummy)
                 */
                urecovery_state &= ~UBIK_RECHAVEDB;
            }
-           lastDBVCheck = FT_ApproxTime();
            urecovery_state |= UBIK_RECFOUNDDB;
            urecovery_state &= ~UBIK_RECSENTDB;
        }
@@ -620,7 +618,6 @@ urecovery_Interact(void *dummy)
                goto FetchEndCall;
            }
 #ifndef OLD_URECOVERY
-           flen = length;
            afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
            fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
            if (fd < 0) {
index 4069cbd..9e1caea 100644 (file)
@@ -476,7 +476,7 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     char hoststr[16];
 #ifndef OLD_URECOVERY
     char pbuffer[1028];
-    int flen, fd = -1;
+    int fd = -1;
     afs_int32 epoch = 0;
     afs_int32 pass;
 #endif
@@ -526,7 +526,6 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     tversion.epoch = 0;                /* start off by labelling in-transit db as invalid */
     (*dbase->setlabel) (dbase, file, &tversion);       /* setlabel does sync */
 #ifndef OLD_URECOVERY
-    flen = length;
     afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
     fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
     if (fd < 0) {