mirror of https://github.com/aria2/aria2
Fixed compile warning/error with mingw32
parent
ebc082747c
commit
3637291c22
|
@ -138,7 +138,7 @@ void DHTRoutingTableSerializer::serialize(const std::string& filename)
|
||||||
// clen bytes compact peer
|
// clen bytes compact peer
|
||||||
WRITE_CHECK(fp, compactPeer, static_cast<size_t>(clen));
|
WRITE_CHECK(fp, compactPeer, static_cast<size_t>(clen));
|
||||||
// 24-clen bytes reserved
|
// 24-clen bytes reserved
|
||||||
WRITE_CHECK(fp, zero, 24-clen);
|
WRITE_CHECK(fp, zero, static_cast<size_t>(24-clen));
|
||||||
// 20bytes: node ID
|
// 20bytes: node ID
|
||||||
WRITE_CHECK(fp, node->getID(), DHT_ID_LENGTH);
|
WRITE_CHECK(fp, node->getID(), DHT_ID_LENGTH);
|
||||||
// 4bytes reserved
|
// 4bytes reserved
|
||||||
|
|
|
@ -68,8 +68,7 @@ FtpDownloadCommand::~FtpDownloadCommand() {}
|
||||||
bool FtpDownloadCommand::prepareForNextSegment()
|
bool FtpDownloadCommand::prepareForNextSegment()
|
||||||
{
|
{
|
||||||
if(getOption()->getAsBool(PREF_FTP_REUSE_CONNECTION) &&
|
if(getOption()->getAsBool(PREF_FTP_REUSE_CONNECTION) &&
|
||||||
static_cast<uint64_t>
|
getFileEntry()->gtoloff(getSegments().front()->getPositionToWrite()) ==
|
||||||
(getFileEntry()->gtoloff(getSegments().front()->getPositionToWrite())) ==
|
|
||||||
getFileEntry()->getLength()) {
|
getFileEntry()->getLength()) {
|
||||||
Command* command = new FtpFinishDownloadCommand
|
Command* command = new FtpFinishDownloadCommand
|
||||||
(getCuid(), getRequest(), getFileEntry(), getRequestGroup(),
|
(getCuid(), getRequest(), getFileEntry(), getRequestGroup(),
|
||||||
|
|
|
@ -35,7 +35,7 @@ void FallocFileAllocationIteratorTest::testAllocate()
|
||||||
of.close();
|
of.close();
|
||||||
|
|
||||||
File f(fn);
|
File f(fn);
|
||||||
CPPUNIT_ASSERT_EQUAL((uint64_t)10, f.size());
|
CPPUNIT_ASSERT_EQUAL((off_t)10, f.size());
|
||||||
|
|
||||||
DefaultDiskWriter writer(fn);
|
DefaultDiskWriter writer(fn);
|
||||||
int64_t offset = 10;
|
int64_t offset = 10;
|
||||||
|
@ -48,7 +48,7 @@ void FallocFileAllocationIteratorTest::testAllocate()
|
||||||
itr.allocateChunk();
|
itr.allocateChunk();
|
||||||
CPPUNIT_ASSERT(itr.finished());
|
CPPUNIT_ASSERT(itr.finished());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL((uint64_t)40960, f.size());
|
CPPUNIT_ASSERT_EQUAL((off_t)40960, f.size());
|
||||||
#endif // !HAVE_FALLOCATE
|
#endif // !HAVE_FALLOCATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue