pop3: fixes 64 bit warnings
This commit is contained in:
@@ -102,7 +102,7 @@ BMailMessageIO::ReadAt(off_t pos, void* buffer, size_t amountToRead)
|
|||||||
|
|
||||||
// Put the file position back at where it was, if possible. That's because
|
// Put the file position back at where it was, if possible. That's because
|
||||||
// ReadAt isn't supposed to affect the file position.
|
// ReadAt isn't supposed to affect the file position.
|
||||||
if (oldPosition < fSize)
|
if (oldPosition < (off_t)fSize)
|
||||||
fSlave->Seek (oldPosition, SEEK_SET);
|
fSlave->Seek (oldPosition, SEEK_SET);
|
||||||
else
|
else
|
||||||
fSlave->Seek (0, SEEK_END);
|
fSlave->Seek (0, SEEK_END);
|
||||||
|
|||||||
@@ -494,8 +494,9 @@ POP3Protocol::Stat()
|
|||||||
if (SendCommand("STAT" CRLF) < B_OK)
|
if (SendCommand("STAT" CRLF) < B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
int32 messages,dropSize;
|
int32 messages, dropSize;
|
||||||
if (sscanf(fLog.String(), "+OK %ld %ld", &messages, &dropSize) < 2)
|
if (sscanf(fLog.String(), "+OK %" B_SCNd32" %" B_SCNd32, &messages,
|
||||||
|
&dropSize) < 2)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
fNumMessages = messages;
|
fNumMessages = messages;
|
||||||
@@ -591,11 +592,11 @@ POP3Protocol::Retrieve(int32 message, BPositionIO *write_to)
|
|||||||
int32 message_len = MessageSize(message);
|
int32 message_len = MessageSize(message);
|
||||||
write_to->Seek (0, SEEK_END);
|
write_to->Seek (0, SEEK_END);
|
||||||
if (write_to->Position() != message_len) {
|
if (write_to->Position() != message_len) {
|
||||||
printf ("POP3Protocol::Retrieve Note: message size is %d, was "
|
printf ("POP3Protocol::Retrieve Note: message size is %" B_PRIdOFF
|
||||||
"expecting %ld, for message #%ld. Could be a transmission error "
|
", was expecting %" B_PRId32 ", for message #%" B_PRId32 ". "
|
||||||
"or a bad POP server implementation (does it remove escape codes "
|
"Could be a transmission error or a bad POP server "
|
||||||
"when it counts size?).\n",
|
"implementation (does it remove escape codes when it counts "
|
||||||
(int) write_to->Position(), message_len, message);
|
"size?).\n", write_to->Position(), message_len, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -916,7 +917,7 @@ POP3Protocol::_UniqueIDs()
|
|||||||
b = atol(&(result.String()[b]));
|
b = atol(&(result.String()[b]));
|
||||||
else
|
else
|
||||||
b = 0;
|
b = 0;
|
||||||
fSizes.AddItem((void *)(b));
|
fSizes.AddItem((void *)(addr_t)b);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user