Fixing compiler warnings.

This commit is contained in:
Robin Sommer 2014-04-24 18:14:18 -07:00
parent 116ed370a2
commit bd64e52782
2 changed files with 5 additions and 4 deletions

View file

@ -135,7 +135,8 @@ public:
int NoDataAcked() const int NoDataAcked() const
{ {
uint64 ack = ToFullSeqSpace(ack_seq, ack_wraps); uint64 ack = ToFullSeqSpace(ack_seq, ack_wraps);
return ack == StartSeqI64() || ack == StartSeqI64() + 1; uint64 start = static_cast<uint64>(StartSeqI64());
return ack == start || ack == start + 1;
} }
Connection* Conn() const; Connection* Conn() const;

View file

@ -376,7 +376,7 @@ void TCP_Reassembler::BlockInserted(DataBlock* start_block)
TrimToSeq(last_reassem_seq); TrimToSeq(last_reassem_seq);
else if ( e->NoDataAcked() && tcp_max_initial_window && else if ( e->NoDataAcked() && tcp_max_initial_window &&
e->Size() > tcp_max_initial_window ) e->Size() > static_cast<uint64>(tcp_max_initial_window) )
// We've sent quite a bit of data, yet none of it has // We've sent quite a bit of data, yet none of it has
// been acked. Presume that we're not seeing the peer's // been acked. Presume that we're not seeing the peer's
// acks (perhaps due to filtering or split routing) and // acks (perhaps due to filtering or split routing) and
@ -465,7 +465,7 @@ int TCP_Reassembler::DataSent(double t, uint64 seq, int len,
NewBlock(t, seq, len, data); NewBlock(t, seq, len, data);
if ( Endpoint()->NoDataAcked() && tcp_max_above_hole_without_any_acks && if ( Endpoint()->NoDataAcked() && tcp_max_above_hole_without_any_acks &&
NumUndeliveredBytes() > tcp_max_above_hole_without_any_acks ) NumUndeliveredBytes() > static_cast<uint64>(tcp_max_above_hole_without_any_acks) )
{ {
tcp_analyzer->Weird("above_hole_data_without_any_acks"); tcp_analyzer->Weird("above_hole_data_without_any_acks");
ClearBlocks(); ClearBlocks();
@ -473,7 +473,7 @@ int TCP_Reassembler::DataSent(double t, uint64 seq, int len,
} }
if ( tcp_excessive_data_without_further_acks && if ( tcp_excessive_data_without_further_acks &&
NumUndeliveredBytes() > tcp_excessive_data_without_further_acks ) NumUndeliveredBytes() > static_cast<uint64>(tcp_excessive_data_without_further_acks) )
{ {
tcp_analyzer->Weird("excessive_data_without_further_acks"); tcp_analyzer->Weird("excessive_data_without_further_acks");
ClearBlocks(); ClearBlocks();