mirror of https://github.com/aria2/aria2
2009-06-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compiler warnings on netbsd * src/DHTConnectionImpl.cc * src/PeerListenCommand.cc * src/PeerSessionResource.cc * src/SegmentMan.ccpull/1/head
parent
23d04f0cc3
commit
8adb77dc29
|
@ -1,3 +1,11 @@
|
|||
2009-06-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed compiler warnings on netbsd
|
||||
* src/DHTConnectionImpl.cc
|
||||
* src/PeerListenCommand.cc
|
||||
* src/PeerSessionResource.cc
|
||||
* src/SegmentMan.cc
|
||||
|
||||
2009-06-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Updated Ukrainian translation. Thanks to all translators.
|
||||
|
|
|
@ -60,7 +60,7 @@ bool DHTConnectionImpl::bind(uint16_t& port, IntSequence& ports)
|
|||
|
||||
for(std::deque<int32_t>::const_iterator portItr = randPorts.begin();
|
||||
portItr != randPorts.end(); ++portItr) {
|
||||
if(!(0 < (*portItr) && (*portItr) <= UINT16_MAX)) {
|
||||
if(!(0 < (*portItr) && (*portItr) <= 65535)) {
|
||||
continue;
|
||||
}
|
||||
port = (*portItr);
|
||||
|
|
|
@ -77,7 +77,7 @@ bool PeerListenCommand::bindPort(uint16_t& port, IntSequence& seq)
|
|||
|
||||
for(std::deque<int32_t>::const_iterator portItr = randPorts.begin();
|
||||
portItr != randPorts.end(); ++portItr) {
|
||||
if(!(0 < (*portItr) && (*portItr) <= UINT16_MAX)) {
|
||||
if(!(0 < (*portItr) && (*portItr) <= 65535)) {
|
||||
continue;
|
||||
}
|
||||
port = (*portItr);
|
||||
|
|
|
@ -237,7 +237,7 @@ void PeerSessionResource::dhtEnabled(bool b)
|
|||
|
||||
void PeerSessionResource::updateLatency(unsigned int latency)
|
||||
{
|
||||
_latency = _latency*0.2+latency*0.8;
|
||||
_latency = static_cast<unsigned int>(_latency*0.2+latency*0.8);
|
||||
}
|
||||
|
||||
uint64_t PeerSessionResource::uploadLength() const
|
||||
|
|
|
@ -132,7 +132,8 @@ SegmentHandle SegmentMan::checkoutSegment(cuid_t cuid,
|
|||
SegmentEntryHandle SegmentMan::findSlowerSegmentEntry
|
||||
(const PeerStatHandle& peerStat)
|
||||
{
|
||||
unsigned int speed = peerStat->getAvgDownloadSpeed()*0.8;
|
||||
unsigned int speed =
|
||||
static_cast<unsigned int>(peerStat->getAvgDownloadSpeed()*0.8);
|
||||
SegmentEntryHandle slowSegmentEntry;
|
||||
int startupIdleTime = _option->getAsInt(PREF_STARTUP_IDLE_TIME);
|
||||
for(std::deque<SharedHandle<SegmentEntry> >::const_iterator itr =
|
||||
|
|
Loading…
Reference in New Issue