Fixed gcc warnings.

This commit is contained in:
irungentoo 2014-08-28 20:54:05 -04:00
parent ff02d5a607
commit 411457dc8f
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
4 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;