mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed gcc warnings.
This commit is contained in:
parent
ff02d5a607
commit
411457dc8f
|
@ -322,7 +322,7 @@ static int write_packet_TCP_secure_connection(TCP_Client_Connection *con, const
|
|||
|
||||
increment_nonce(con->sent_nonce);
|
||||
|
||||
if (len == sizeof(packet)) {
|
||||
if ((unsigned int)len == sizeof(packet)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ static int write_packet_TCP_secure_connection(TCP_Secure_Connection *con, const
|
|||
|
||||
increment_nonce(con->sent_nonce);
|
||||
|
||||
if (len == sizeof(packet)) {
|
||||
if ((unsigned int)len == sizeof(packet)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,8 +108,8 @@ int create_data_request(uint8_t *packet, uint16_t max_packet_length, const uint8
|
|||
int len = encrypt_data(encrypt_public_key, random_secret_key, packet + 1 + crypto_box_PUBLICKEYBYTES, data, length,
|
||||
packet + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES + crypto_box_PUBLICKEYBYTES);
|
||||
|
||||
if (1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES + crypto_box_PUBLICKEYBYTES +
|
||||
(uint32_t)len != DATA_REQUEST_MIN_SIZE + length)
|
||||
if (1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES + crypto_box_PUBLICKEYBYTES + len != DATA_REQUEST_MIN_SIZE +
|
||||
length)
|
||||
return -1;
|
||||
|
||||
return DATA_REQUEST_MIN_SIZE + length;
|
||||
|
|
|
@ -231,7 +231,7 @@ static int send_onion_packet_tcp_udp(const Onion_Client *onion_c, const Onion_Pa
|
|||
if (len == -1)
|
||||
return -1;
|
||||
|
||||
if ((uint32_t)sendpacket(onion_c->net, path->ip_port1, packet, len) != len)
|
||||
if (sendpacket(onion_c->net, path->ip_port1, packet, len) != len)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user