diff --git a/src/analyzer/protocol/tcp/TCP_Endpoint.h b/src/analyzer/protocol/tcp/TCP_Endpoint.h index 95186c583a..96cc497421 100644 --- a/src/analyzer/protocol/tcp/TCP_Endpoint.h +++ b/src/analyzer/protocol/tcp/TCP_Endpoint.h @@ -135,7 +135,8 @@ public: int NoDataAcked() const { uint64 ack = ToFullSeqSpace(ack_seq, ack_wraps); - return ack == StartSeqI64() || ack == StartSeqI64() + 1; + uint64 start = static_cast(StartSeqI64()); + return ack == start || ack == start + 1; } Connection* Conn() const; diff --git a/src/analyzer/protocol/tcp/TCP_Reassembler.cc b/src/analyzer/protocol/tcp/TCP_Reassembler.cc index 1fabfc5d73..053e8c8f60 100644 --- a/src/analyzer/protocol/tcp/TCP_Reassembler.cc +++ b/src/analyzer/protocol/tcp/TCP_Reassembler.cc @@ -376,7 +376,7 @@ void TCP_Reassembler::BlockInserted(DataBlock* start_block) TrimToSeq(last_reassem_seq); else if ( e->NoDataAcked() && tcp_max_initial_window && - e->Size() > tcp_max_initial_window ) + e->Size() > static_cast(tcp_max_initial_window) ) // We've sent quite a bit of data, yet none of it has // been acked. Presume that we're not seeing the peer's // 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); if ( Endpoint()->NoDataAcked() && tcp_max_above_hole_without_any_acks && - NumUndeliveredBytes() > tcp_max_above_hole_without_any_acks ) + NumUndeliveredBytes() > static_cast(tcp_max_above_hole_without_any_acks) ) { tcp_analyzer->Weird("above_hole_data_without_any_acks"); ClearBlocks(); @@ -473,7 +473,7 @@ int TCP_Reassembler::DataSent(double t, uint64 seq, int len, } if ( tcp_excessive_data_without_further_acks && - NumUndeliveredBytes() > tcp_excessive_data_without_further_acks ) + NumUndeliveredBytes() > static_cast(tcp_excessive_data_without_further_acks) ) { tcp_analyzer->Weird("excessive_data_without_further_acks"); ClearBlocks();