Fix several simple cases of unused variables.
Change-Id: I6e61ea625c6bcef7b0bc70c61909f22d1f8dd9a7
Reviewed-on: http://gerrit.openafs.org/4504
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
struct destServer destination;
struct nvldbentry entry;
- int islocked, pntg;
+ int islocked;
afs_int32 error;
int same;
afs_int32 store_flags;
clonetid = 0;
error = 0;
volid = 0;
- pntg = 0;
backupId = 0;
newVol = 0;
*/
fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
fromtid = 0;
- pntg = 1;
tst =
AFSVolTransCreate(fromconn, afromvol, afrompart, ITOffline,
}
}
- pntg = 1;
toconn = UV_Bind(cellHandle, atoserver, AFSCONF_VOLUMEPORT); /* get connections to the servers */
fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
fromtid = totid = 0; /* initialize to uncreated */
int islocked = 0;
int pass = 0;
afs_int32 modentry = 0;
- afs_int32 delentry = 0;
if (modified) {
*modified = 0;
if (tst) {
goto fail_CheckVldb;
}
- delentry = 1;
} else {
/* Replace old entry with our new one */
if (!VLDB_ReplaceEntry
usage:
Quit("Usage: upserver [<directory>+] [-crypt <directory>+] [-clear <directory>+] [-auth <directory>+] [-rxbind] [-help]\n");
} else {
- int dirlen;
if (nDirs >= sizeof(dirName) / sizeof(dirName[0]))
Quit("Too many dirs");
- dirlen = strlen(argv[a]);
if (AddObject(&dirName[nDirs], argv[a])) {
printf("%s: Unable to export dir %s. Skipping\n", whoami,
argv[a]);
static char rn[] = "uss_acl_SetDiskQuota";
#endif
uss_VolumeStatus_t *status;
- char *name, *motd, *offmsg;
+ char *motd, *offmsg;
char *input;
char tmp_str[AFS_PIOCTL_MAXSIZE];
status = (uss_VolumeStatus_t *) tmp_str;
status->MinQuota = status->MaxQuota = -1;
- name = motd = offmsg = NULL;
+ motd = offmsg = NULL;
status->MaxQuota = a_q;
input = (char *)status + sizeof(*status);
/* find correct index for new row by bi-secting the table */
int
findRowIndex(struct util_Table* Table, struct util_TableRow *aRow){
- int cmp,best,lower,middle,upper;
+ int cmp,lower,middle,upper;
/* empty Table */
if (Table->numRows == 0) {
lower = 0;
upper= Table->numRows-1;
- best=0;
do {
middle=(upper-lower)/2+lower;
cmp=compareBodyRow(Table,middle,aRow);
if (cmp > 0) {
upper=middle;
- best = lower;
}
if (cmp < 0) {
lower=middle;
- best = upper;
}
if (cmp == 0) {
return middle;
struct cmd_item *ti;
afs_int32 hostAddr;
struct hostent *thp;
- int setp;
ti = as->parms[0].items;
- setp = 1;
if (ti) {
thp = hostutil_GetHostByName(ti->data);
if (!thp) {
else memcpy(&hostAddr, thp->h_addr, sizeof(afs_int32));
} else {
hostAddr = 0; /* means don't set host */
- setp = 0; /* aren't setting host */
}
/* now do operation */
afs_int32 code;
struct ViceIoctl blob;
struct cmd_item *ti;
- int export = 0, type = 0, mode = 0, exp = 0, exportcall, pwsync =
+ int export = 0, type = 0, mode = 0, exportcall, pwsync =
0, smounts = 0, clipags = 0, pagcb = 0;
ti = as->parms[0].items;
fprintf(stderr, "Illegal argument %s\n", ti->data);
return 1;
}
- exp = 1;
}
if ((ti = as->parms[2].items)) { /* -noconvert */
if (strcmp(ti->data, "on") == 0)
CallHandler(FSYNC_readfds, nfds, POLLIN|POLLPRI);
#else
int maxfd;
+#ifdef AFS_PTHREAD_ENV
struct timeval s_timeout;
+#endif
GetHandler(&FSYNC_readfds, &maxfd);
- s_timeout.tv_sec = SYNC_SELECT_TIMEOUT;
- s_timeout.tv_usec = 0;
/* Note: check for >= 1 below is essential since IOMGR_select
* doesn't have exactly same semantics as select.
*/
#ifdef AFS_PTHREAD_ENV
+ s_timeout.tv_sec = SYNC_SELECT_TIMEOUT;
+ s_timeout.tv_usec = 0;
if (select(maxfd + 1, &FSYNC_readfds, NULL, NULL, &s_timeout) >= 1)
#else /* AFS_PTHREAD_ENV */
if (IOMGR_Select(maxfd + 1, &FSYNC_readfds, NULL, NULL, NULL) >= 1)