Skip to content

Commit

Permalink
fixing compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheidegger committed May 18, 2021
1 parent 973faf0 commit 4d99f29
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions utp_internal.cpp
Expand Up @@ -154,10 +154,16 @@ enum {
ST_NUM_STATES, // used for bounds checking
};

#if UTP_DEBUG_LOGGING
static const cstr flagnames[] = {
"ST_DATA","ST_FIN","ST_STATE","ST_RESET","ST_SYN"
};

static const cstr statenames[] = {
"UNINITIALIZED", "IDLE","SYN_SENT", "SYN_RECV", "CONNECTED","CONNECTED_FULL","DESTROY_DELAY","RESET","DESTROY"
};
#endif

enum CONN_STATE {
CS_UNINITIALIZED = 0,
CS_IDLE,
Expand All @@ -169,10 +175,6 @@ enum CONN_STATE {
CS_DESTROY
};

static const cstr statenames[] = {
"UNINITIALIZED", "IDLE","SYN_SENT", "SYN_RECV", "CONNECTED","CONNECTED_FULL","DESTROY_DELAY","RESET","DESTROY"
};

struct OutgoingPacket {
size_t length;
size_t payload;
Expand Down Expand Up @@ -1971,7 +1973,7 @@ size_t utp_process_incoming(UTPSocket *conn, const byte *packet, size_t len, boo
if (pkt == 0 || pkt->transmissions == 0) continue;
assert((int)(pkt->payload) >= 0);
acked_bytes += pkt->payload;
if (conn->mtu_probe_seq && seq == conn->mtu_probe_seq) {
if (conn->mtu_probe_seq && (uint32) seq == conn->mtu_probe_seq) {
conn->mtu_floor = conn->mtu_probe_size;
conn->mtu_search_update();
conn->log(UTP_LOG_MTU, "MTU [ACK] floor:%d ceiling:%d current:%d"
Expand Down

0 comments on commit 4d99f29

Please sign in to comment.