summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-08-21 20:55:14 -0400
committerirungentoo <irungentoo@gmail.com>2014-08-21 20:55:14 -0400
commit69a55b87d2e9fd750abbb6c201176f39179e0981 (patch)
treebfc64ce87d5b74f88331defec65c5c696df6be4f
parent86a4685eba0b810db4f4c4e0b4913aeff401397f (diff)
Fixed some gcc warnings.
-rw-r--r--toxcore/DHT.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index b963d8de..6bd23081 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -641,25 +641,25 @@ static int replace_all( Client_data *list,
641 } else if (hardening_correct(&client->assoc4.hardening) != HARDENING_ALL_OK && 641 } else if (hardening_correct(&client->assoc4.hardening) != HARDENING_ALL_OK &&
642 hardening_correct(&client->assoc6.hardening) != HARDENING_ALL_OK) { 642 hardening_correct(&client->assoc6.hardening) != HARDENING_ALL_OK) {
643 // "possibly bad" node 643 // "possibly bad" node
644 if (possibly_bad == ~0 || 644 if (possibly_bad == (uint32_t)~0 ||
645 id_closest(comp_client_id, list[possibly_bad].client_id, list[i].client_id) == 1) 645 id_closest(comp_client_id, list[possibly_bad].client_id, list[i].client_id) == 1)
646 possibly_bad = i; 646 possibly_bad = i;
647 } else { 647 } else {
648 // "good" node 648 // "good" node
649 if (good == ~0 || 649 if (good == (uint32_t)~0 ||
650 id_closest(comp_client_id, list[good].client_id, list[i].client_id) == 1) 650 id_closest(comp_client_id, list[good].client_id, list[i].client_id) == 1)
651 good = i; 651 good = i;
652 } 652 }
653 } 653 }
654 654
655 if (bad != ~0) 655 if (bad != (uint32_t)~0)
656 replace = bad; 656 replace = bad;
657 else if (possibly_bad != ~0) 657 else if (possibly_bad != (uint32_t)~0)
658 replace = possibly_bad; 658 replace = possibly_bad;
659 else if (good != ~0 && id_closest(comp_client_id, list[good].client_id, client_id) == 2) 659 else if (good != (uint32_t)~0 && id_closest(comp_client_id, list[good].client_id, client_id) == 2)
660 replace = good; 660 replace = good;
661 661
662 if (replace != ~0) { 662 if (replace != (uint32_t)~0) {
663 Client_data *client = &list[replace]; 663 Client_data *client = &list[replace];
664 IPPTsPng *ipptp_write = NULL; 664 IPPTsPng *ipptp_write = NULL;
665 IPPTsPng *ipptp_clear = NULL; 665 IPPTsPng *ipptp_clear = NULL;