/* for now, assume that all ops in log pertain to one transaction; see if there's a commit */
while (1) {
code =
- (*adbase->read) (adbase, LOGFILE, &opcode, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
sizeof(afs_int32));
if (code != sizeof(afs_int32))
break;
} else if (opcode == LOGTRUNCATE) {
tpos += 4;
code =
- (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
2 * sizeof(afs_int32));
if (code != 2 * sizeof(afs_int32))
break; /* premature eof or io error */
} else if (opcode == LOGDATA) {
tpos += 4;
code =
- (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
3 * sizeof(afs_int32));
if (code != 3 * sizeof(afs_int32))
break;
syncFile = -1;
while (1) {
code =
- (*adbase->read) (adbase, LOGFILE, &opcode, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
sizeof(afs_int32));
if (code != sizeof(afs_int32))
break;
else if (opcode == LOGEND) {
tpos += 4;
code =
- (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
2 * sizeof(afs_int32));
if (code != 2 * sizeof(afs_int32))
return UBADLOG;
- code = (*adbase->setlabel) (adbase, 0, buffer);
+ code = (*adbase->setlabel) (adbase, 0, (ubik_version *)buffer);
if (code)
return code;
logIsGood = 1;
} else if (opcode == LOGTRUNCATE) {
tpos += 4;
code =
- (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
2 * sizeof(afs_int32));
if (code != 2 * sizeof(afs_int32))
break; /* premature eof or io error */
} else if (opcode == LOGDATA) {
tpos += 4;
code =
- (*adbase->read) (adbase, LOGFILE, buffer, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
3 * sizeof(afs_int32));
if (code != 3 * sizeof(afs_int32))
break;
thisSize = (len > sizeof(data) ? sizeof(data) : len);
/* copy sizeof(data) buffer bytes at a time */
code =
- (*adbase->read) (adbase, LOGFILE, data, tpos,
+ (*adbase->read) (adbase, LOGFILE, (char *)data, tpos,
thisSize);
if (code != thisSize)
return UBADLOG;
code =
- (*adbase->write) (adbase, tfile, data, filePos,
+ (*adbase->write) (adbase, tfile, (char *)data, filePos,
thisSize);
if (code != thisSize)
return UBADLOG;
ubik_dprint("StartDiskGetFile failed=%d\n", code);
goto FetchEndCall;
}
- nbytes = rx_Read(rxcall, &length, sizeof(afs_int32));
+ nbytes = rx_Read(rxcall, (char *)&length, sizeof(afs_int32));
length = ntohl(length);
if (nbytes != sizeof(afs_int32)) {
ubik_dprint("Rx-read length error=%d\n", code = BULK_ERROR);