From: Marc Dionne Date: Sat, 11 Sep 2010 17:06:26 +0000 (-0400) Subject: ubik: Set but not used variables X-Git-Tag: upstream/1.8.0_pre1^2~4599 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e30e916e2059bac14f1d1dec3213d703374b1fe9;p=packages%2Fo%2Fopenafs.git ubik: Set but not used variables 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 Reviewed-by: Derrick Brashear --- diff --git a/src/ubik/recovery.c b/src/ubik/recovery.c index e23d31c3e..6d4144a96 100644 --- a/src/ubik/recovery.c +++ b/src/ubik/recovery.c @@ -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) { diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 4069cbd1b..9e1caea11 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -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) {