mirror of https://github.com/aria2/aria2
2008-10-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile warning on linux-amd64 * src/FtpConnection.cc * src/IteratableChunkChecksumValidator.cc * src/MultiDiskAdaptor.cc Fixed the bug that unit test fails on linux-amd64 * test/UtilTest.ccpull/1/head
parent
d12e69f0eb
commit
6ef72a14a2
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-10-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed compile warning on linux-amd64
|
||||
* src/FtpConnection.cc
|
||||
* src/IteratableChunkChecksumValidator.cc
|
||||
* src/MultiDiskAdaptor.cc
|
||||
|
||||
Fixed the bug that unit test fails on linux-amd64
|
||||
* test/UtilTest.cc
|
||||
|
||||
2008-10-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Added --dht-file-path option to change the path to dht.dat, which is a
|
||||
|
|
|
@ -347,7 +347,8 @@ unsigned int FtpConnection::receiveSizeResponse(uint64_t& size)
|
|||
std::pair<unsigned int, std::string> response;
|
||||
if(bulkReceiveResponse(response)) {
|
||||
if(response.first == 213) {
|
||||
sscanf(response.second.c_str(), "%*u " LONGLONG_SCANF, &size);
|
||||
sscanf(response.second.c_str(), "%*u " ULONGLONG_SCANF,
|
||||
reinterpret_cast<long long unsigned int*>(&size));
|
||||
}
|
||||
return response.first;
|
||||
} else {
|
||||
|
|
|
@ -155,7 +155,7 @@ std::string IteratableChunkChecksumValidator::digest(off_t offset, size_t length
|
|||
strerror(errno)).str());
|
||||
}
|
||||
size_t wlength;
|
||||
if(max < curoffset+r) {
|
||||
if(max < static_cast<off_t>(curoffset+r)) {
|
||||
wlength = max-curoffset-woffset;
|
||||
} else {
|
||||
wlength = r-woffset;
|
||||
|
|
|
@ -222,7 +222,8 @@ void MultiDiskAdaptor::resetDiskWriterEntries()
|
|||
++itr;
|
||||
|
||||
for(; itr != diskWriterEntries.end(); ++itr) {
|
||||
if((*itr)->getFileEntry()->getOffset() < pieceStartOffset+pieceLength) {
|
||||
if((*itr)->getFileEntry()->getOffset() <
|
||||
static_cast<off_t>(pieceStartOffset+pieceLength)) {
|
||||
(*itr)->needsFileAllocation(true);
|
||||
} else {
|
||||
break;
|
||||
|
|
|
@ -677,8 +677,13 @@ void UtilTest::testHttpGMT()
|
|||
CPPUNIT_ASSERT_EQUAL((time_t)0, Util::httpGMT("Thu, 1970-01-01 0:0:0 GMT"));
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)2147483647,
|
||||
Util::httpGMT("Tue, 2038-01-19 3:14:7 GMT"));
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)2147483647,
|
||||
Util::httpGMT("Tue, 2038-01-19 3:14:8 GMT"));
|
||||
if(sizeof(time_t) == 4) {
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)2147483647,
|
||||
Util::httpGMT("Tue, 2038-01-19 3:14:8 GMT"));
|
||||
} else if(sizeof(time_t) == 8) {
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)2147483648,
|
||||
Util::httpGMT("Tue, 2038-01-19 3:14:8 GMT"));
|
||||
}
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)-1,
|
||||
Util::httpGMT("Tue, 2008/10/10 23:33:33 UTC"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue